github-agent 2.4.15__py3-none-any.whl → 2.6.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.
@@ -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(
github_agent/kg_ingest.py CHANGED
@@ -1,7 +1,7 @@
1
- """Native epistemic-graph ingestion for GitHub records (typed graph nodes + documents).
1
+ """Native medulla ingestion for GitHub records (typed graph nodes + documents).
2
2
 
3
3
  CONCEPT:AU-KG.ingest.enterprise-source-extractor. The github-agent connector natively
4
- pushes its data into the ONE epistemic-graph knowledge graph as **typed OWL nodes**
4
+ pushes its data into the ONE medulla knowledge graph as **typed OWL nodes**
5
5
  (``:Repository``, ``:PullRequest``, ``:Issue``, ``:Release``, ``:Organization``,
6
6
  ``:Person``, ``:PipelineRun``, ``:CheckRun``) plus links, and release notes as
7
7
  **:Document** nodes for semantic search, through the ``scion_sdk.ingest``
@@ -65,7 +65,7 @@ async def ingest_entities(
65
65
  *,
66
66
  ingest: KnowledgeIngest | None = None,
67
67
  ) -> dict[str, int] | None:
68
- """Write typed OWL nodes (+ edges) into epistemic-graph. Best-effort, never raises.
68
+ """Write typed OWL nodes (+ edges) into medulla. Best-effort, never raises.
69
69
 
70
70
  ``entities``: ``[{"id":..., "node_type":<owl:Class>, ...props}]``.
71
71
  ``relationships``: ``[{"source":id, "target":id, "relationship":<link>}]``.
@@ -29,6 +29,7 @@ from scion_sdk.config import load_config
29
29
  from scion_sdk.connector_identity import connector_version
30
30
  from scion_sdk.mcp.concurrency import run_blocking
31
31
  from scion_sdk.mcp.content import ConnectorContent
32
+ from scion_sdk.mcp.destructive import guard_destructive
32
33
  from scion_sdk.mcp.server import create_mcp_server
33
34
  from scion_sdk.mcp.tool_surface import register_tool_surface
34
35
 
@@ -114,7 +115,7 @@ def register_ingest_tools(mcp: FastMCP):
114
115
  default=None, description="MCP context for progress reporting"
115
116
  ),
116
117
  ) -> Any:
117
- """Natively ingest GitHub repositories into epistemic-graph as typed :Repository nodes.
118
+ """Natively ingest GitHub repositories into medulla as typed :Repository nodes.
118
119
 
119
120
  Lists the authenticated user's repositories via the GitHub API and pushes them
120
121
  (with their owner :Organization/:Person + :ownedByOrg links) into the knowledge
@@ -170,7 +171,7 @@ def register_ingest_tools(mcp: FastMCP):
170
171
  default=None, description="MCP context for progress reporting"
171
172
  ),
172
173
  ) -> Any:
173
- """Natively ingest GitHub Actions workflow runs into epistemic-graph.
174
+ """Natively ingest GitHub Actions workflow runs into medulla.
174
175
 
175
176
  Lists recent workflow runs for a repository (+ each run's jobs, unless
176
177
  ``include_jobs=false``) via the GitHub API and pushes them as typed
@@ -218,7 +219,7 @@ def register_auto_merge_tools(mcp: FastMCP):
218
219
  """Register the GraphQL-only pull request auto-merge tools."""
219
220
 
220
221
  @mcp.tool(
221
- tags={"pulls"}, annotations={"readOnlyHint": False, "destructiveHint": False}
222
+ tags={"pulls"}, annotations={"readOnlyHint": False, "destructiveHint": True}
222
223
  )
223
224
  async def github_pulls_enable_auto_merge(
224
225
  owner: str = Field(description="Repository owner."),
@@ -228,9 +229,21 @@ def register_auto_merge_tools(mcp: FastMCP):
228
229
  default="MERGE", description="MERGE, SQUASH or REBASE."
229
230
  ),
230
231
  client=Depends(get_client),
232
+ confirm: bool = Field(
233
+ default=False,
234
+ description="Confirm this destructive call when the client cannot be asked.",
235
+ ),
231
236
  ctx: Context | None = Field(default=None, description="MCP context"),
232
237
  ) -> Any:
233
238
  """Turn on auto-merge for a pull request: it merges once required checks pass."""
239
+ refused = await guard_destructive(
240
+ ctx,
241
+ "enable_auto_merge",
242
+ {"owner": owner, "repo": repo, "number": number},
243
+ confirm=confirm,
244
+ )
245
+ if refused is not None:
246
+ return refused
234
247
  try:
235
248
  gql_client = await run_blocking(get_graphql_client)
236
249
  except Exception as e:
@@ -1,7 +1,7 @@
1
1
  """Github ontology contribution (CONCEPT:AU-KG.ontology.federation-provider-leg).
2
2
 
3
3
  Data-only subpackage: it carries ``github.ttl`` (the ``owl:Ontology``
4
- ``http://knuckles.team/kg/github`` module — organizations, repositories, pull requests,
4
+ ``https://knuckles-team.github.io/ontology/connector/github`` module — organizations, repositories, pull requests,
5
5
  issues, releases, branches, commits, workflows and workflow runs with their review and
6
6
  delivery relationships) which the scion-sdk hub federates in via
7
7
  the ``scion_sdk.ontology_providers`` entry-point. It holds no business logic
@@ -2,10 +2,10 @@
2
2
  "api_version": "graphos.io/v1",
3
3
  "artifacts": {
4
4
  "github_agent/ontology/fixtures/records.json": "12f5b54b0ae98770f279f99e136788d063340042a9d6ff4bac0c22a886d2dc7b",
5
- "github_agent/ontology/github.ttl": "3558c43835211ddcf7d2af622a37c0c370a7e8fe6b40a111b9bc98dd7e91f2ac",
5
+ "github_agent/ontology/github.ttl": "5ee5e592487f56898e38b878ac928c262b7c40c05cb329df2d15783181932672",
6
6
  "github_agent/ontology/mappings/source.yaml": "5142f75b88634aeac6850fe6de5b176958d63073daab2c573cf9c03daa46021c",
7
7
  "github_agent/ontology/migrations/manifest.json": "adf16022502dd031dd303a52abae7a0677ece1135e1e05c21dba24c9ae51935c",
8
- "github_agent/ontology/shapes/connector.shacl.ttl": "709f555b7b8cc6b1e0adddfeb8e077834f5db548bed4a904afd2a195e49aab1c"
8
+ "github_agent/ontology/shapes/connector.shacl.ttl": "0972b7e3b5f56fb0452f070800cd1f7ee790f6cf183f308f1cf69e5a0db716e0"
9
9
  },
10
10
  "checks": {
11
11
  "declared_tool_schema": "passed",
@@ -29,5 +29,5 @@
29
29
  "signer": "UNSIGNED-PREVIEW",
30
30
  "signing_public_key": "",
31
31
  "status": "source-validated",
32
- "validated_at": "2026-11-06T18:41:25Z"
32
+ "validated_at": "2026-11-13T00:07:32Z"
33
33
  }
@@ -1,7 +1,8 @@
1
1
  @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
2
2
  @prefix foaf: <http://xmlns.com/foaf/0.1/> .
3
3
  @prefix dc: <http://purl.org/dc/terms/> .
4
- @prefix : <http://knuckles.team/kg#> .
4
+ @prefix : <https://knuckles-team.github.io/ontology/connector/github#> .
5
+ @prefix core: <https://knuckles-team.github.io/ontology/core#> .
5
6
  @prefix owl: <http://www.w3.org/2002/07/owl#> .
6
7
  @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
7
8
  @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@@ -15,24 +16,26 @@
15
16
  # Shared concepts owned by the epistemic-graph ontology and referenced here, never redeclared:
16
17
  # Repository, PullRequest, Release, Branch, Commit, PipelineRun. Only the GitHub-specific subclasses and properties are declared in this pack.
17
18
 
18
- :Organization a owl:Class .
19
+ :Organization a owl:Class ;
20
+ rdfs:subClassOf core:Organization .
19
21
 
20
22
 
21
23
  :Issue a owl:Class ;
22
- rdfs:subClassOf :WorkItem ;
24
+ rdfs:subClassOf core:WorkItem ;
23
25
  rdfs:label "Issue" ;
24
26
  rdfs:comment "A tracked work item, bug, or discussion in a repository (github_get_issues)." .
25
27
 
26
- :Workflow a owl:Class .
28
+ :Workflow a owl:Class ;
29
+ rdfs:subClassOf core:Workflow .
27
30
 
28
31
 
29
32
  :WorkflowRun a owl:Class ;
30
- rdfs:subClassOf :PipelineRun ;
33
+ rdfs:subClassOf core:PipelineRun ;
31
34
  rdfs:label "Workflow Run" ;
32
35
  rdfs:comment "A single execution of a GitHub Actions workflow for a ref/commit (github_get_workflow_runs)." .
33
36
 
34
37
  :CheckRun a owl:Class ;
35
- rdfs:subClassOf :PipelineRun ;
38
+ rdfs:subClassOf core:PipelineRun ;
36
39
  rdfs:label "Check Run" ;
37
40
  rdfs:comment """A single job/check within a PipelineRun (github_get_workflow_run_jobs workflow-run job or
38
41
  GitHub Checks-API check run). Shares its class name with the twin gitlab-api producer.""" .
@@ -42,34 +45,34 @@
42
45
  :belongsToRepository a owl:ObjectProperty ;
43
46
  rdfs:label "belongs to repository" ;
44
47
  rdfs:comment "Links a PullRequest, Issue, Branch, Commit, Release, Workflow, or WorkflowRun to its Repository." ;
45
- rdfs:range :Repository .
48
+ rdfs:range core:Repository .
46
49
 
47
50
  :ownedByOrg a owl:ObjectProperty ;
48
51
  rdfs:label "owned by organization" ;
49
52
  rdfs:comment "Links a Repository to the Organization (or user) that owns it." ;
50
- rdfs:domain :Repository ;
53
+ rdfs:domain core:Repository ;
51
54
  rdfs:range :Organization .
52
55
 
53
56
  :authoredBy a owl:ObjectProperty ;
54
57
  rdfs:label "authored by" ;
55
58
  rdfs:comment "Links a PullRequest, Issue, or Commit to the Person who created it." ;
56
- rdfs:range :Person .
59
+ rdfs:range core:Person .
57
60
 
58
61
  :assignedTo a owl:ObjectProperty ;
59
62
  rdfs:label "assigned to" ;
60
63
  rdfs:comment "Links an Issue or PullRequest to the Person responsible for it." ;
61
- rdfs:range :Person .
64
+ rdfs:range core:Person .
62
65
 
63
66
  :targetsBranch a owl:ObjectProperty ;
64
67
  rdfs:label "targets branch" ;
65
68
  rdfs:comment "Links a PullRequest to the base Branch it merges into." ;
66
- rdfs:domain :PullRequest ;
67
- rdfs:range :Branch .
69
+ rdfs:domain core:PullRequest ;
70
+ rdfs:range core:Branch .
68
71
 
69
72
  :closesIssue a owl:ObjectProperty ;
70
73
  rdfs:label "closes issue" ;
71
74
  rdfs:comment "Links a PullRequest to an Issue it resolves." ;
72
- rdfs:domain :PullRequest ;
75
+ rdfs:domain core:PullRequest ;
73
76
  rdfs:range :Issue .
74
77
 
75
78
  :hasWorkflowRun a owl:ObjectProperty ;
@@ -83,27 +86,27 @@
83
86
  rdfs:comment """Links a PipelineRun to what it ran for — its Repository, the Commit it
84
87
  built, and/or the PullRequest it validated. Same predicate name as the twin gitlab-api
85
88
  producer (Pipeline ranFor Project/Commit/MergeRequest).""" ;
86
- rdfs:domain :PipelineRun .
89
+ rdfs:domain core:PipelineRun .
87
90
 
88
91
  :hasJob a owl:ObjectProperty ;
89
92
  rdfs:label "has job" ;
90
93
  rdfs:comment """Links a PipelineRun to a CheckRun (job/check) it contains. Same predicate
91
94
  name as the twin gitlab-api producer (Pipeline hasJob Job).""" ;
92
- rdfs:domain :PipelineRun ;
95
+ rdfs:domain core:PipelineRun ;
93
96
  rdfs:range :CheckRun .
94
97
 
95
98
  :documentsRelease a owl:ObjectProperty ;
96
99
  rdfs:label "documents release" ;
97
100
  rdfs:comment "Links a Release to the :Document carrying its release-notes body." ;
98
- rdfs:domain :Release ;
99
- rdfs:range :Document .
101
+ rdfs:domain core:Release ;
102
+ rdfs:range core:Document .
100
103
 
101
104
  # --- fields (owl:DatatypeProperty) ---
102
105
 
103
106
  :fullName a owl:DatatypeProperty ;
104
107
  rdfs:label "full name" ;
105
108
  rdfs:comment "Owner-qualified repository name (owner/repo)." ;
106
- rdfs:domain :Repository ;
109
+ rdfs:domain core:Repository ;
107
110
  rdfs:range xsd:string .
108
111
 
109
112
  :htmlUrl a owl:DatatypeProperty ;
@@ -114,7 +117,7 @@
114
117
  :state a owl:DatatypeProperty ;
115
118
  rdfs:label "state" ;
116
119
  rdfs:comment "Lifecycle state (open, closed, merged)." ;
117
- rdfs:domain [ a owl:Class ; owl:unionOf ( :Issue :PullRequest ) ] ;
120
+ rdfs:domain [ a owl:Class ; owl:unionOf ( :Issue core:PullRequest ) ] ;
118
121
  rdfs:range xsd:string .
119
122
 
120
123
  :number a owl:DatatypeProperty ;
@@ -135,13 +138,13 @@
135
138
  :defaultBranch a owl:DatatypeProperty ;
136
139
  rdfs:label "default branch" ;
137
140
  rdfs:comment "Name of a repository's default branch." ;
138
- rdfs:domain :Repository ;
141
+ rdfs:domain core:Repository ;
139
142
  rdfs:range xsd:string .
140
143
 
141
144
  :isPrivate a owl:DatatypeProperty ;
142
145
  rdfs:label "is private" ;
143
146
  rdfs:comment "Whether a repository is private." ;
144
- rdfs:domain :Repository ;
147
+ rdfs:domain core:Repository ;
145
148
  rdfs:range xsd:boolean .
146
149
 
147
150
  :isDraft a owl:DatatypeProperty ;
@@ -167,37 +170,37 @@
167
170
  :headSha a owl:DatatypeProperty ;
168
171
  rdfs:label "head sha" ;
169
172
  rdfs:comment "Full git commit SHA a PipelineRun ran against." ;
170
- rdfs:domain :PipelineRun ;
173
+ rdfs:domain core:PipelineRun ;
171
174
  rdfs:range xsd:string .
172
175
 
173
176
  :headBranch a owl:DatatypeProperty ;
174
177
  rdfs:label "head branch" ;
175
178
  rdfs:comment "Branch name a PipelineRun ran against." ;
176
- rdfs:domain :PipelineRun ;
179
+ rdfs:domain core:PipelineRun ;
177
180
  rdfs:range xsd:string .
178
181
 
179
182
  :event a owl:DatatypeProperty ;
180
183
  rdfs:label "event" ;
181
184
  rdfs:comment "Triggering event of a PipelineRun (push, pull_request, schedule, workflow_dispatch)." ;
182
- rdfs:domain :PipelineRun ;
185
+ rdfs:domain core:PipelineRun ;
183
186
  rdfs:range xsd:string .
184
187
 
185
188
  :runStartedAt a owl:DatatypeProperty ;
186
189
  rdfs:label "run started at" ;
187
190
  rdfs:comment "Timestamp a PipelineRun started executing." ;
188
- rdfs:domain :PipelineRun ;
191
+ rdfs:domain core:PipelineRun ;
189
192
  rdfs:range xsd:dateTime .
190
193
 
191
194
  :runUpdatedAt a owl:DatatypeProperty ;
192
195
  rdfs:label "run updated at" ;
193
196
  rdfs:comment "Timestamp a PipelineRun was last updated." ;
194
- rdfs:domain :PipelineRun ;
197
+ rdfs:domain core:PipelineRun ;
195
198
  rdfs:range xsd:dateTime .
196
199
 
197
200
  :durationSeconds a owl:DatatypeProperty ;
198
201
  rdfs:label "duration seconds" ;
199
202
  rdfs:comment "Wall-clock duration in seconds of a PipelineRun (runUpdatedAt - runStartedAt)." ;
200
- rdfs:domain :PipelineRun ;
203
+ rdfs:domain core:PipelineRun ;
201
204
  rdfs:range xsd:integer .
202
205
 
203
206
  :startedAt a owl:DatatypeProperty ;
@@ -212,7 +215,7 @@
212
215
  rdfs:domain :CheckRun ;
213
216
  rdfs:range xsd:dateTime .
214
217
 
215
- <http://knuckles.team/kg/github> a owl:Ontology ;
218
+ <https://knuckles-team.github.io/ontology/connector/github> a owl:Ontology ;
216
219
  rdfs:label "GitHub Ontology" ;
217
220
  rdfs:comment """GitHub source-control, code-review and CI/CD model — organizations,
218
221
  repositories, pull requests, issues, releases, branches, commits, workflows and
@@ -1,5 +1,5 @@
1
- @prefix : <http://knuckles.team/kg#> .
2
- @prefix shape: <http://knuckles.team/kg/github/shape#> .
1
+ @prefix : <https://knuckles-team.github.io/ontology/core#> .
2
+ @prefix shape: <https://knuckles-team.github.io/ontology/connector/github-shapes#> .
3
3
  @prefix sh: <http://www.w3.org/ns/shacl#> .
4
4
  @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
5
5
 
@@ -65,8 +65,7 @@ with local copies or bypass a failing check.
65
65
  - Credentials come from `GITHUB_TOKEN`; the endpoint is derived from `GITHUB_URL`
66
66
  (`api.github.com`, or a GitHub Enterprise `/api/v3` host whose GraphQL endpoint
67
67
  is `/api/graphql`). Mock all GitHub calls; never use a real token in a gate.
68
- - Destructive operations stay behind `GITHUB_ALLOW_DESTRUCTIVE`; keep it false
69
- by default and test both states.
68
+ - Destructive operations are declared once with the SDK `destructive_operation` decorator; the SDK asks the caller to confirm (`confirm=true`), and `SCION_ALLOW_DESTRUCTIVE` is the one operator setting. Never add a connector-local knob.
70
69
  - Prefer one aliased `github_graphql` query over many REST calls for cross-repo
71
70
  reads; keep REST and GraphQL parity when adding a tool domain.
72
71
  - Packaged skills under `github_agent/skills/` have their own helper tests
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-agent
3
- Version: 2.4.15
3
+ Version: 2.6.0
4
4
  Summary: GitHub Agent for MCP
5
5
  Author-email: Repository Maintainers <maintainers@knuckles.team>
6
6
  License: MIT
@@ -13,7 +13,7 @@ Requires-Python: >=3.12
13
13
  Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
15
  Requires-Dist: requests>=2.34.2
16
- Requires-Dist: scion-sdk[graphql,mcp]>=0.9.0
16
+ Requires-Dist: scion-sdk[graphql,mcp]<0.12,>=0.11.0
17
17
  Provides-Extra: mcp
18
18
  Provides-Extra: all
19
19
  Provides-Extra: test
@@ -223,7 +223,7 @@ When query strings or parameters are supplied, an LLM-free **Knowledge Graph res
223
223
 
224
224
  > **Install the connector-focused `[mcp]` extra.** Examples use `github-agent[mcp]` to add
225
225
  > FastMCP / FastAPI through `scion-sdk`; the required Scion SDK core
226
- > still carries `epistemic-graph[full]`. The `[agent-runtime]` extra additionally
226
+ > still carries `medulla[full]`. The `[agent-runtime]` extra additionally
227
227
  > enables model orchestration.
228
228
 
229
229
  #### stdio Transport (local IDEs — Cursor, Claude Desktop, VS Code)
@@ -247,7 +247,6 @@ When query strings or parameters are supplied, an LLM-free **Knowledge Graph res
247
247
  "COMMITTOOL": "True",
248
248
  "CONTENTTOOL": "True",
249
249
  "DEPENDABOTTOOL": "True",
250
- "GITHUB_ALLOW_DESTRUCTIVE": "False",
251
250
  "GITHUB_HTTP_CONNECT_TIMEOUT": "10",
252
251
  "GITHUB_HTTP_READ_TIMEOUT": "30",
253
252
  "GITHUB_TOKEN": "your_github_token_here",
@@ -298,7 +297,6 @@ own runtime secret boundary.
298
297
  "COMMITTOOL": "True",
299
298
  "CONTENTTOOL": "True",
300
299
  "DEPENDABOTTOOL": "True",
301
- "GITHUB_ALLOW_DESTRUCTIVE": "False",
302
300
  "GITHUB_HTTP_CONNECT_TIMEOUT": "10",
303
301
  "GITHUB_HTTP_READ_TIMEOUT": "30",
304
302
  "GITHUB_TOKEN": "your_github_token_here",
@@ -348,7 +346,6 @@ docker run -i --rm \
348
346
  -e COMMITTOOL=True \
349
347
  -e CONTENTTOOL=True \
350
348
  -e DEPENDABOTTOOL=True \
351
- -e GITHUB_ALLOW_DESTRUCTIVE=False \
352
349
  -e GITHUB_HTTP_CONNECT_TIMEOUT=10 \
353
350
  -e GITHUB_HTTP_READ_TIMEOUT=30 \
354
351
  -e GITHUB_TOKEN=your_github_token_here \
@@ -412,7 +409,6 @@ the detailed transport contract.
412
409
  | `TLS_PROFILE` | `private-ca` | AgentConfig named transport profile |
413
410
  | `TLS_PROFILE_REF` | `secret://transport/provider` | Direct runtime profile reference |
414
411
  | `TLS_PROFILES_REF` | `secret://transport/catalog` | Named runtime profile catalog |
415
- | `GITHUB_ALLOW_DESTRUCTIVE` | `False` | Allow destructive (delete/force) operations |
416
412
  | `GITHUB_HTTP_CONNECT_TIMEOUT` | `10` | HTTP client timeouts (seconds) |
417
413
  | `GITHUB_HTTP_READ_TIMEOUT` | `30` | |
418
414
  | `DEBUG` | `False` | |
@@ -614,7 +610,7 @@ Pick the extra that matches what the operator want to run:
614
610
 
615
611
  | Extra | Installs | Use when |
616
612
  |-------|----------|----------|
617
- | `github-agent[mcp]` | Connector-focused MCP server (`scion-sdk` — FastMCP/FastAPI + `epistemic-graph[full]`) | The operator only run the **MCP server** (smallest install / image) |
613
+ | `github-agent[mcp]` | Connector-focused MCP server (`scion-sdk` — FastMCP/FastAPI + `medulla[full]`) | The operator only run the **MCP server** (smallest install / image) |
618
614
  | `github-agent[all]` | Everything (`mcp` + `agent` + `logfire`) | Development / both surfaces |
619
615
 
620
616
  ```bash
@@ -639,14 +635,14 @@ One multi-stage `docker/Dockerfile` builds the MCP-only image (`--target mcp`):
639
635
 
640
636
  agent (`immutable agent digest`) with a co-located `:mcp` sidecar.
641
637
 
642
- ### Knowledge-graph database (`epistemic-graph`)
638
+ ### Knowledge-graph database (`medulla`)
643
639
 
644
- Scion SDK core dependency (`epistemic-graph[full]`). The `[mcp]` extra keeps
640
+ Scion SDK core dependency (`medulla[full]`). The `[mcp]` extra keeps
645
641
  deployments can use the bundled engine. For production or shared state, run
646
- **epistemic-graph as a dedicated database service** and configure the runtime to use it.
642
+ **medulla as a dedicated database service** and configure the runtime to use it.
647
643
  Deployment recipes (single-node + Raft HA), connection configuration, and architecture
648
644
  diagrams are documented in the
649
- [epistemic-graph deployment guide](https://knuckles-team.github.io/epistemic-graph/deployment/).
645
+ [medulla deployment guide](https://knuckles-team.github.io/medulla/deployment/).
650
646
 
651
647
  ---
652
648
 
@@ -1,40 +1,40 @@
1
1
  github_agent/__init__.py,sha256=C7pWvMKXqVTxI5_jZAr1KWEYADZurn5is0VOx5l5CbM,474
2
2
  github_agent/__main__.py,sha256=O4Xg__fMvKfUsA6m61pLV56jlYY6EORiLhgDLlp0vJ8,92
3
3
  github_agent/api_client.py,sha256=O69YfkXBKyVd59EC8szaMlw3_ZxwEEvsLSvhWlfYnvk,1581
4
- github_agent/auth.py,sha256=W26J0N34mXIvq5ipYokJ7eJcInfnvxaGvqOiGWyWUp0,4611
4
+ github_agent/auth.py,sha256=pB3jUeP7qvLdzzpYeZZ8o7FTS3GMsBpuaIIzWx1daLs,4239
5
5
  github_agent/connector_contracts.py,sha256=2plbwsw6d4mMuxRx-kksD4EamYDgf03HOqBFd8ixCAQ,41936
6
6
  github_agent/connector_sources.py,sha256=00mzXqC9KPSi15QIIE20UkmgS0QLd7wnYAatdWAjRoQ,6329
7
7
  github_agent/github_gql.py,sha256=23_sJnv037WE2CvG93bXFHob8oiw1VShnevLi78BiTU,4282
8
8
  github_agent/github_http.py,sha256=DFLLft5IaMyS1txieuKnPN1Vme36lJW2CYiOe2DfG40,4334
9
9
  github_agent/github_input_models.py,sha256=yqqPGHb206th736MZvbnxq9F1JRsBUBODNeNVc08F3A,15568
10
10
  github_agent/github_response_models.py,sha256=mllSt0frBgzklUtfuHywJ2Ald3m99So948Xikt3H2Tc,8859
11
- github_agent/kg_ingest.py,sha256=aXVYbK8RDlE39wBJxgxc73OoqEdgNJLGUCFCl5hbNd8,17958
11
+ github_agent/kg_ingest.py,sha256=_aVI7Gc-E7_cNg4eDKbwHUorcH-3WGUDu6qECtRrh2c,17934
12
12
  github_agent/mcp_config.json,sha256=2OOXrwO1sDLyHQqpZwhvDHizPIe3by6YmK4KFE333gI,23
13
- github_agent/mcp_server.py,sha256=wgI99lAUtzsIaazgSDH7g5HnXKgg8bSHj3bS5jDvxp8,15317
13
+ github_agent/mcp_server.py,sha256=-04Yy2lvFMbd3LxkXuE4llwAu6zkMzyU_ki5PHg28mA,15768
14
14
  github_agent/api/__init__.py,sha256=ntaEPqk-dsAV3HyyDLc2hYpc9nTTyG5CKI-SVDDjc24,27
15
15
  github_agent/api/api_client_base.py,sha256=UdVOUPPRnfVo8IeZxpHXn7VbrHm-4vsXTKk3ZAv8wgQ,7445
16
16
  github_agent/api/api_client_branches.py,sha256=Lj3eCwNxuyR564YV4Lh00Zm4xjsJDfN20q463ON5qDg,3930
17
17
  github_agent/api/api_client_comments.py,sha256=lfUveMt5m3-ZPrIY2UV-j3huEm1nThllz1uPp2QxVnw,13192
18
18
  github_agent/api/api_client_commits.py,sha256=1p8XOPnlGAtNvhG3JqoediHnCANK-z0B066AY0NiahY,1471
19
19
  github_agent/api/api_client_contents.py,sha256=3dwNkGzl_Nk5PlGKsdlmw2lKf9HQUOOxChZfpnRgD-Q,3916
20
- github_agent/api/api_client_dependabot.py,sha256=IKSwk8Qkb0ME6uqNLwWNB2EnjZEy7cv9VCSw2RSViV4,3521
20
+ github_agent/api/api_client_dependabot.py,sha256=0JE2xe3bJjAx5gJYkGCad1-ak3o6eKP0De86qEFlHu4,3608
21
21
  github_agent/api/api_client_issues.py,sha256=yOmzu1bFd2s_FOdQpuq5J4ob6h-a33R4JjtqQ4AWrsk,2952
22
- github_agent/api/api_client_orgs.py,sha256=rm5fbM0DvGbE-XYFOD8T25tFHHyzAMtXS8TtZ2XTlOI,11114
23
- github_agent/api/api_client_pages.py,sha256=D7AiKMKAQhBJvMU0v7dBO2aUhmF9gnzW0QBe5DFch-A,8827
24
- github_agent/api/api_client_pulls.py,sha256=R1DZnx-oQ2FV0-nTe74WPZJJTOms6KsJPzSXjYa3kxQ,5801
22
+ github_agent/api/api_client_orgs.py,sha256=OVJ3qWwgXt6YBbfjAAdSS3xqiWhhvFhsbiVmZcdB8BY,11040
23
+ github_agent/api/api_client_pages.py,sha256=9-4yM4dbsqxn9VUD6k2Jezzn4AfVxhNnUMnAStaL5L0,8790
24
+ github_agent/api/api_client_pulls.py,sha256=8q2s2Ir-Ci_y4PwPSsFonxipH9llpOK-HkFyd42mzrU,5888
25
25
  github_agent/api/api_client_releases.py,sha256=q3XrePe9KW3_tyjzpagnGIU4KOJB4wo3Ek-g4yxsGCY,3661
26
26
  github_agent/api/api_client_repos.py,sha256=zBpuc4WeslH7Pw0PKeh9XpveE4eGmoSXsUniED8hCHE,8420
27
27
  github_agent/api/api_client_search.py,sha256=-lOrVHjSncZ4us2tr4Keo3ygUdOABJxCWikpbsmTwJo,2222
28
28
  github_agent/api/api_client_workflows.py,sha256=_ukxS6rnezp33Zk6bmAyNv4RIjwZvkUfbxPrT1kU7r4,5789
29
29
  github_agent/connectors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
30
  github_agent/mcp/__init__.py,sha256=9aOfl64J5oMSnaUZVwnpo3XO7GykLM2D11_4Kt761go,31
31
- github_agent/ontology/__init__.py,sha256=dy7lE5jChNOHXMHm7ZfGfT8bH8ZhCZMSuGgu3G-Q3mM,532
32
- github_agent/ontology/certification.json,sha256=JRRsPwnTiQOAAnWaMWgWNoWo5nxoCpdJ-squxKokY4M,1313
33
- github_agent/ontology/github.ttl,sha256=NVjEODUhHdz30q9iKjfAw3Cn6P5rQKERubyY3X6R8qw,8209
31
+ github_agent/ontology/__init__.py,sha256=4baB_l2qeJYF9TcaUnrR2KBS66yLru2S_g6cnrnq2nM,559
32
+ github_agent/ontology/certification.json,sha256=eXTXC-zgHKgOpA-9zZjjeec5OR_reM0KYUSrZ50MNTM,1313
33
+ github_agent/ontology/github.ttl,sha256=XuXlkkh_VomOOLh4rJKMJit8QMBcsynfLRV4MYGTJnI,8507
34
34
  github_agent/ontology/fixtures/records.json,sha256=EvW1Swrph3DyefmeE2eI0GM0AEKp1v9LrAwiqIbS3Hs,543
35
35
  github_agent/ontology/mappings/source.yaml,sha256=UUL3W4hjSurGhQ_m3lsXaVjWMHPaqyxXPPnAPapGAhw,529
36
36
  github_agent/ontology/migrations/manifest.json,sha256=rfFgIlAt0DHdMDpSq656Bnfs4RNeHgXCHbokya5Rk1w,118
37
- github_agent/ontology/shapes/connector.shacl.ttl,sha256=cJ9VW3uMxrHgrd3-uOB3g09dtUi-1KkEr9KhleSaqxw,3234
37
+ github_agent/ontology/shapes/connector.shacl.ttl,sha256=CXK347X1b7BFLwcIAM0ffueQ9s8YPzCPHPaeWg23FuA,3284
38
38
  github_agent/prompts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  github_agent/prompts/github-mcp-operator.json,sha256=HZVcyK-7TdWT7XKnjmJL2V1XsNhha9PHtJMVj0wT_uo,12687
40
40
  github_agent/prompts/github-mcp-release-manager.json,sha256=Vi4NwiDjI4O_VLntSXzSFidcu_eL4fsI0a41pv6QlvA,6990
@@ -42,7 +42,7 @@ github_agent/prompts/github-mcp-repository-administrator.json,sha256=rkPXgrh3UN5
42
42
  github_agent/prompts/github-mcp-triage-lead.json,sha256=-PZ_ycFLeQRN5hPEBmkqr6WJQQhPmOECUUrzRKXkGF8,4581
43
43
  github_agent/skills/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
44
  github_agent/skills/github-actions-ci-review/SKILL.md,sha256=v_g7ilOldIotyzvizEbgiQqUszNBqcP4BSdtUxxroy4,1998
45
- github_agent/skills/github-agent-development/SKILL.md,sha256=77dGiA9HNulJ0nWu81ppCac7VCP9cpzRi0P5ZUL32yU,3924
45
+ github_agent/skills/github-agent-development/SKILL.md,sha256=5Rd_v1QmXbMo_DC2nQXB2BGQgOUQoEhogyFWvKROuK0,4047
46
46
  github_agent/skills/github-agent-operations/SKILL.md,sha256=sPwGdgGfXZLFsCttOaEaJ7zTzttgNeFItgmB6gcFdPE,2739
47
47
  github_agent/skills/github-backlog-planner/SKILL.md,sha256=xzP7Iyvm9huKF4-XR1JjwIuIjYpJoHfi5PNvW5BqzMU,2631
48
48
  github_agent/skills/github-backlog-planner/references/addressed-heuristics.md,sha256=GoW7Adzm43p7pKlh6U_g2mHtNHrrgdM60EY917384gQ,3413
@@ -68,13 +68,14 @@ github_agent/skills/github-triage-resolver/SKILL.md,sha256=o8EIk-rrDSmeTBn2gl_Qd
68
68
  github_agent/skills/github-triage-resolver/references/resolution-rules.md,sha256=lGPvfLCSHpNIeh2rKWcH2k_2lla3ovgBxzwvtMmyQ-0,4133
69
69
  github_agent/skills/github-triage-resolver/scripts/classify_safe.py,sha256=peh1R5oksZfTwlzWEvKuBLmMBdNwHucwAJYWYA9fVDU,9548
70
70
  github_agent/skills/github-triage-resolver/scripts/gh_write.py,sha256=ZA9xXbjzM-jq1dSFzcZVd1_fKyGeU4mZSAfmX4LeqxY,4129
71
- github_agent-2.4.15.dist-info/licenses/LICENSE,sha256=5ALbh4fIALWVsUhO7q1nFT1bQb-CL9sWKf7p3GgLEG8,1070
71
+ github_agent-2.6.0.dist-info/licenses/LICENSE,sha256=5ALbh4fIALWVsUhO7q1nFT1bQb-CL9sWKf7p3GgLEG8,1070
72
72
  tests/conftest.py,sha256=wbbxNvJTHj5_Ma2ewxkI0--A_CM9KtlMzI_rWN-F82Q,3533
73
73
  tests/test_api_client_endpoints.py,sha256=ykF9UMx3hIbf_dCpecl9uE57FJ-VQH5yw51dUQ1WlVc,6572
74
74
  tests/test_api_validation.py,sha256=eXAKGdqzGyoKFoN4-RmZzCwKBtyK43pVEFliwzQDH2Q,3291
75
75
  tests/test_auth_client_edge_cases.py,sha256=OZjqgLoOQPxDVwqQZMxPG7VIfS6szKUMgABNpvLgKuQ,6440
76
- tests/test_cq_paths.py,sha256=ypZSbpB0gQv8-FT1jtw-ZVwJ5JP2pXaSl2ocRhhT1Mw,1485
76
+ tests/test_cq_paths.py,sha256=CpV0kAgukA2-_5sD8mHgV-pCchXk6vaEh40fe6ZJS0A,1481
77
77
  tests/test_default_content_surfaces.py,sha256=UmgtO78MWki9qmTzZtnNxy47SNVmsjZjz_8dQKQQe58,2455
78
+ tests/test_destructive_declaration.py,sha256=yBDf2HJ9rvVk9skrBR9hTmWVcJNTfjlSsBeEqauPsI0,2751
78
79
  tests/test_fleet_name.py,sha256=L1SuM4w05dbQvyj-eBiw01lKfvI-p2o1oj6dpQxsPIY,1409
79
80
  tests/test_github_agent_api_brute_force_coverage.py,sha256=5jWW6oVU7cmXL2sS3OZ-3gbYGhyjlYPIWqH2rsdF2fw,7347
80
81
  tests/test_github_agent_brute_force_coverage.py,sha256=n5RJyxWfOeZEMXRRx_c48pF9ntN_ai67qyzUKtzoiKQ,4849
@@ -82,10 +83,11 @@ tests/test_github_gql.py,sha256=YVc9M6nE-QH7qCnyGhk6N0XKs1sL14r5A9hToIWJ1qQ,2741
82
83
  tests/test_github_http.py,sha256=ExI55gKutqcJjX2R1r9JFfWaL9VjrKMb1vMRDBaDI4I,9813
83
84
  tests/test_ingest_sources.py,sha256=SQFPhf0qqgX_R5sn2NP_5qVzT3x2rqQIATbvHBM7IFs,1150
84
85
  tests/test_init_dynamics.py,sha256=qX7QPHvM9T7-1fE9clZWHZz2NHG9PddsEu4WmO7dwm8,1840
85
- tests/test_kg_ingest.py,sha256=98VEL2pog_8xl_lQa8qGwcPmeszt0BAxJp5AjlcvVUk,9466
86
+ tests/test_kg_ingest.py,sha256=v2V71Uyy7t3Y9JPv-Qzxmrze6k5hsfecyOElzNlZuuY,9458
86
87
  tests/test_model_fields.py,sha256=NboFxPOtLN-uevE9TLbS4Al-55RbF63PFFTa318gJ40,3374
87
- tests/test_ontology_parent_link.py,sha256=1VZrOLDQAmpXT9Sv1Bc4Q9EA2uC5q6WW1N3pvujcJZU,4062
88
+ tests/test_ontology_parent_link.py,sha256=gUOJpLYB-3bXXLg30lyctffxpgHnZF-tnz2GdPrvxgQ,4572
88
89
  tests/test_pages.py,sha256=ow_qLRo4IytkSGdQxjxJGoZOnTY0s8MebHFZn_ggElg,10815
90
+ tests/test_scion_sdk_0_10_imports.py,sha256=BPxhlrY66oktDNuve6EGyx8mqR9_wRPUfFoT3BEcfb8,2186
89
91
  tests/test_skill_backlog_build_plan.py,sha256=DdvwgZKQnQ-d_SxErxKoTpjOROuCijr4q7CVAqB82BI,4569
90
92
  tests/test_skill_ci_failure_sweep_summarize_runs.py,sha256=lFHXWuIzGHCzHQpBBqF4VSHIfzO6cKVgstZHdXqE7U0,3933
91
93
  tests/test_skill_github_tools_fetch_comments.py,sha256=CWYy8BReKekpSYXD7Q6jlbdWTXepb5lobatRo5L1P40,3511
@@ -94,8 +96,8 @@ tests/test_skill_org_remediation_classify_fix_risk.py,sha256=CK43UuLA9ZomajH7EMO
94
96
  tests/test_skill_pr_review_sweep_summarize_prs.py,sha256=NrNaucQvM7K-k1WBcOBKtTGjxJbW16VgTHbC7dSsjm4,3821
95
97
  tests/test_skill_triage_resolver_classify_safe.py,sha256=CNXXf98xa6UYk1xoQyDM6ZSbW_G_WLNMb-oNYUFErcI,9535
96
98
  tests/test_startup.py,sha256=Ix_g69k0tsZbY0-Vkeh8ADWojUdbYwTwwmnM4_hVuCc,1245
97
- github_agent-2.4.15.dist-info/METADATA,sha256=KVjNepnTBdyh4lJds2cMeBP70yT_83GD7TlgHuwxVKs,31841
98
- github_agent-2.4.15.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
99
- github_agent-2.4.15.dist-info/entry_points.txt,sha256=Xs66xjLEy6t408ysVybR_GA4blcThForMZfxAMw4oAw,125
100
- github_agent-2.4.15.dist-info/top_level.txt,sha256=rF1I0e3JiEUPistmGCg9UI1zYzTjg-bzVJ61YgbPrjU,42
101
- github_agent-2.4.15.dist-info/RECORD,,
99
+ github_agent-2.6.0.dist-info/METADATA,sha256=U3BVbboZ1R4Rbn7XmDrfJhz44JeP-b8lGrdbark5TgE,31576
100
+ github_agent-2.6.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
101
+ github_agent-2.6.0.dist-info/entry_points.txt,sha256=Xs66xjLEy6t408ysVybR_GA4blcThForMZfxAMw4oAw,125
102
+ github_agent-2.6.0.dist-info/top_level.txt,sha256=rF1I0e3JiEUPistmGCg9UI1zYzTjg-bzVJ61YgbPrjU,42
103
+ github_agent-2.6.0.dist-info/RECORD,,
tests/test_cq_paths.py CHANGED
@@ -14,7 +14,7 @@ pytestmark = pytest.mark.spec("CONN-GITHUB-AGENT-CONNECTOR-CONTENT-R004")
14
14
 
15
15
  PACKAGE = Path(github_agent.__file__).parent
16
16
  TTL = (PACKAGE / "ontology" / "github.ttl").read_text("utf-8")
17
- # Concepts the epistemic-graph ontology owns: referenced, never declared here.
17
+ # Concepts the medulla ontology owns: referenced, never declared here.
18
18
  SHARED = ("Repository", "PullRequest", "Release", "Branch", "Commit", "PipelineRun")
19
19
 
20
20
 
@@ -35,7 +35,7 @@ def test_state_is_declared_on_the_issue_type() -> None:
35
35
 
36
36
 
37
37
  def test_check_run_extends_pipeline_run() -> None:
38
- assert "rdfs:subClassOf :PipelineRun" in _block("CheckRun")
38
+ assert "rdfs:subClassOf core:PipelineRun" in _block("CheckRun")
39
39
 
40
40
 
41
41
  def test_no_mapping_has_a_null_ontology_class() -> None:
@@ -0,0 +1,86 @@
1
+ """CONN-GITHUB-AGENT-CONNECTOR-CONTENT-R008: destructive operations use the SDK's one declaration and guard."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import asyncio
6
+ import importlib
7
+ from unittest.mock import patch
8
+
9
+ import pytest
10
+ import requests
11
+ from fastmcp import Client, FastMCP
12
+
13
+ pytestmark = pytest.mark.spec("CONN-GITHUB-AGENT-CONNECTOR-CONTENT-R008")
14
+
15
+ DECLARED = {
16
+ "github_merge_pull_request",
17
+ "github_update_dependabot_alert",
18
+ "github_pulls_enable_auto_merge",
19
+ }
20
+ CLASSIFIED = {"github_delete_repository", "github_delete_branch"}
21
+
22
+
23
+ def _server() -> FastMCP:
24
+ module = importlib.import_module("github_agent.mcp_server")
25
+ with patch(
26
+ "sys.argv", ["github-mcp", "--transport", "stdio", "--auth-type", "none"]
27
+ ):
28
+ result = module.get_mcp_instance()
29
+ if isinstance(result, FastMCP):
30
+ return result
31
+ return next(value for value in result if isinstance(value, FastMCP))
32
+
33
+
34
+ def test_declared_and_classified_operations_are_destructive_tools_that_ask_first(
35
+ monkeypatch,
36
+ ):
37
+ monkeypatch.delenv("SCION_ALLOW_DESTRUCTIVE", raising=False)
38
+
39
+ async def _run():
40
+ async with Client(_server()) as client:
41
+ tools = {t.name: t for t in await client.list_tools()}
42
+ for name in DECLARED | CLASSIFIED:
43
+ assert tools[name].annotations.destructive_hint is True, name
44
+ assert "confirm" in tools[name].input_schema["properties"], name
45
+ for name, tool in tools.items():
46
+ assert "allow_destructive" not in tool.input_schema["properties"], name
47
+
48
+ asyncio.run(_run())
49
+
50
+
51
+ @pytest.mark.parametrize(
52
+ "name,arguments",
53
+ [
54
+ (
55
+ "github_merge_pull_request",
56
+ {"owner": "o", "repo": "r", "number": 1},
57
+ ),
58
+ (
59
+ "github_delete_branch",
60
+ {"owner": "o", "repo": "r", "branch": "b"},
61
+ ),
62
+ ],
63
+ )
64
+ def test_unconfirmed_call_sends_no_request(name, arguments, monkeypatch):
65
+ monkeypatch.delenv("SCION_ALLOW_DESTRUCTIVE", raising=False)
66
+ monkeypatch.setenv("GITHUB_TOKEN", "test-token")
67
+ sent: list[str] = []
68
+
69
+ def record(self, method, url, **kwargs):
70
+ sent.append(f"{method} {url}")
71
+ raise AssertionError("no request may be made without confirmation")
72
+
73
+ monkeypatch.setattr(requests.Session, "request", record)
74
+
75
+ async def _run():
76
+ async with Client(_server()) as client:
77
+ refused = await client.call_tool(name, arguments, raise_on_error=False)
78
+ assert refused.structured_content["cancelled"] is True
79
+
80
+ asyncio.run(_run())
81
+ assert sent == []
82
+
83
+
84
+ def test_no_connector_local_knob_remains():
85
+ auth = importlib.import_module("github_agent.auth")
86
+ assert not hasattr(auth, "allow_destructive_default")
tests/test_kg_ingest.py CHANGED
@@ -1,4 +1,4 @@
1
- """Native epistemic-graph typed-node + document ingestion — Wire-First coverage.
1
+ """Native medulla typed-node + document ingestion — Wire-First coverage.
2
2
 
3
3
  Exercises the real ``ingest_entities`` / ``ingest_documents`` seam and the GitHub
4
4
  record mappers against a fake SDK transport (no engine required), asserting the
@@ -1,4 +1,4 @@
1
- """Every class of the packaged ontology reaches an epistemic-graph parent class (CONN-GITHUB-AGENT-CONNECTOR-CONTENT-R002)."""
1
+ """Every class of the packaged ontology reaches an medulla parent class (CONN-GITHUB-AGENT-CONNECTOR-CONTENT-R002)."""
2
2
 
3
3
  from __future__ import annotations
4
4
 
@@ -9,27 +9,32 @@ import pytest
9
9
 
10
10
  pytestmark = pytest.mark.spec("CONN-GITHUB-AGENT-CONNECTOR-CONTENT-R002")
11
11
 
12
- PARENT_IRI = "http://knuckles.team/kg"
12
+ PARENT_IRI = "https://knuckles-team.github.io/ontology/core"
13
13
  ONTOLOGIES = sorted(
14
14
  (Path(__file__).resolve().parents[1] / "github_agent" / "ontology").glob("*.ttl")
15
15
  )
16
16
  OWL = "http://www.w3.org/2002/07/owl#"
17
17
  RDF_TYPE = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
18
18
  SUBCLASS = "http://www.w3.org/2000/01/rdf-schema#subClassOf"
19
- # Parent classes of the epistemic-graph ontology that this connector links to or redeclares.
19
+ # Parent classes of the medulla ontology that this connector links to or redeclares.
20
20
  PARENT_CLASSES = frozenset(
21
21
  (
22
- "http://knuckles.team/kg#Commit",
23
- "http://knuckles.team/kg#Document",
24
- "http://knuckles.team/kg#Organization",
25
- "http://knuckles.team/kg#Person",
26
- "http://knuckles.team/kg#PipelineRun",
27
- "http://knuckles.team/kg#PullRequest",
28
- "http://knuckles.team/kg#SoftwareProject",
29
- "http://knuckles.team/kg#WorkItem",
30
- "http://knuckles.team/kg#Workflow",
22
+ "https://knuckles-team.github.io/ontology/core#Commit",
23
+ "https://knuckles-team.github.io/ontology/core#Document",
24
+ "https://knuckles-team.github.io/ontology/connector/github#Organization",
25
+ "https://knuckles-team.github.io/ontology/core#Person",
26
+ "https://knuckles-team.github.io/ontology/core#PipelineRun",
27
+ "https://knuckles-team.github.io/ontology/core#PullRequest",
28
+ "https://knuckles-team.github.io/ontology/core#SoftwareProject",
29
+ "https://knuckles-team.github.io/ontology/core#WorkItem",
30
+ "https://knuckles-team.github.io/ontology/connector/github#Workflow",
31
31
  )
32
32
  )
33
+ # The core ontology is addressed under its one HTTPS base; a pack class rolls up to a core class by that IRI.
34
+ CORE_BASE = "https://knuckles-team.github.io/ontology/core#"
35
+ PARENT_CLASSES = PARENT_CLASSES | frozenset(
36
+ CORE_BASE + iri.rsplit("#", 1)[1] for iri in PARENT_CLASSES
37
+ )
33
38
  # Classes for which the parent ontology has no fitting class yet. Each is a candidate for a new
34
39
  # parent class (see the orphan mapping report); a class leaves this set when it gains a parent.
35
40
  PENDING_NEW_PARENT: frozenset[str] = frozenset()
@@ -0,0 +1,59 @@
1
+ """Every scion_sdk import in this repository resolves on the pinned SDK release."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import ast
6
+ import importlib
7
+ import importlib.util
8
+ from pathlib import Path
9
+
10
+ ROOT = Path(__file__).resolve().parent.parent
11
+ SKIP = {".git", ".venv", "venv", "node_modules", "build", "dist", ".tox", "__pycache__"}
12
+
13
+
14
+ def _python_files() -> list[Path]:
15
+ return [
16
+ p
17
+ for p in ROOT.rglob("*.py")
18
+ if not (set(p.relative_to(ROOT).parts) & SKIP)
19
+ and not any(part.startswith(".") for part in p.relative_to(ROOT).parts)
20
+ ]
21
+
22
+
23
+ def _is_sdk(name: str | None) -> bool:
24
+ return bool(name) and (name == "scion_sdk" or name.startswith("scion_sdk."))
25
+
26
+
27
+ def test_every_scion_sdk_import_resolves_on_the_pinned_release() -> None:
28
+ missing: list[str] = []
29
+ for path in _python_files():
30
+ tree = ast.parse(path.read_text(encoding="utf-8"))
31
+ rel = path.relative_to(ROOT)
32
+ for node in ast.walk(tree):
33
+ if isinstance(node, ast.Import):
34
+ for alias in node.names:
35
+ if (
36
+ _is_sdk(alias.name)
37
+ and importlib.util.find_spec(alias.name) is None
38
+ ):
39
+ missing.append(f"{rel}:{node.lineno} {alias.name}")
40
+ elif (
41
+ isinstance(node, ast.ImportFrom)
42
+ and node.level == 0
43
+ and _is_sdk(node.module)
44
+ ):
45
+ if importlib.util.find_spec(node.module) is None:
46
+ missing.append(f"{rel}:{node.lineno} {node.module}")
47
+ continue
48
+ module = importlib.import_module(node.module)
49
+ for alias in node.names:
50
+ if alias.name == "*" or hasattr(module, alias.name):
51
+ continue
52
+ if importlib.util.find_spec(f"{node.module}.{alias.name}") is None:
53
+ missing.append(
54
+ f"{rel}:{node.lineno} {node.module}.{alias.name}"
55
+ )
56
+ assert not missing, (
57
+ "scion_sdk names that do not exist on the pinned release:\n"
58
+ + "\n".join(missing)
59
+ )