spring-runtime-mcp 0.2.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 (118) hide show
  1. spring_runtime_mcp/__init__.py +3 -0
  2. spring_runtime_mcp/adapters/__init__.py +1 -0
  3. spring_runtime_mcp/adapters/beans.py +159 -0
  4. spring_runtime_mcp/adapters/conditions.py +333 -0
  5. spring_runtime_mcp/adapters/config.py +295 -0
  6. spring_runtime_mcp/adapters/drift.py +790 -0
  7. spring_runtime_mcp/adapters/health.py +164 -0
  8. spring_runtime_mcp/adapters/mapping_predicates.py +201 -0
  9. spring_runtime_mcp/adapters/mappings.py +294 -0
  10. spring_runtime_mcp/adapters/migrations.py +373 -0
  11. spring_runtime_mcp/adapters/openapi.py +683 -0
  12. spring_runtime_mcp/adapters/source_catalog.py +119 -0
  13. spring_runtime_mcp/adapters/startup.py +202 -0
  14. spring_runtime_mcp/analyzers/__init__.py +1 -0
  15. spring_runtime_mcp/analyzers/bean_graph.py +172 -0
  16. spring_runtime_mcp/analyzers/condition_failures.py +359 -0
  17. spring_runtime_mcp/cli.py +248 -0
  18. spring_runtime_mcp/contracts/__init__.py +1 -0
  19. spring_runtime_mcp/contracts/definitions.py +425 -0
  20. spring_runtime_mcp/diagnostics.py +254 -0
  21. spring_runtime_mcp/models/__init__.py +1 -0
  22. spring_runtime_mcp/models/bean_graph.py +77 -0
  23. spring_runtime_mcp/models/common.py +99 -0
  24. spring_runtime_mcp/models/conditions.py +56 -0
  25. spring_runtime_mcp/models/queries.py +140 -0
  26. spring_runtime_mcp/models/source_catalog.py +35 -0
  27. spring_runtime_mcp/models/timestamps.py +71 -0
  28. spring_runtime_mcp/policy/__init__.py +1 -0
  29. spring_runtime_mcp/policy/configuration.py +32 -0
  30. spring_runtime_mcp/policy/output_guard.py +117 -0
  31. spring_runtime_mcp/policy/sanitization.py +616 -0
  32. spring_runtime_mcp/py.typed +0 -0
  33. spring_runtime_mcp/replay.py +220 -0
  34. spring_runtime_mcp/replay_data/bean_graph/README.md +26 -0
  35. spring_runtime_mcp/replay_data/bean_graph/factory-method/conditions.json +43 -0
  36. spring_runtime_mcp/replay_data/bean_graph/factory-method/source-catalog.json +54 -0
  37. spring_runtime_mcp/replay_data/bean_graph/nested-conditions/beans.json +99 -0
  38. spring_runtime_mcp/replay_data/bean_graph/nested-conditions/conditions.json +25 -0
  39. spring_runtime_mcp/replay_data/bean_graph/parent-child/beans.json +92 -0
  40. spring_runtime_mcp/replay_data/bean_graph/shape-metadata.json +32 -0
  41. spring_runtime_mcp/replay_data/bean_graph/stripe-missing/conditions.json +43 -0
  42. spring_runtime_mcp/replay_data/bean_graph/stripe-missing/source-catalog.json +54 -0
  43. spring_runtime_mcp/replay_data/conformance/README.md +41 -0
  44. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/beans.json +92 -0
  45. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/conditions.json +52 -0
  46. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/configprops.json +20 -0
  47. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/env.json +16 -0
  48. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/flyway.json +40 -0
  49. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/health-v2.json +14 -0
  50. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/health-v3.json +38 -0
  51. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/liquibase.json +30 -0
  52. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/mappings.json +40 -0
  53. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/openapi.json +54 -0
  54. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/source-catalog.json +90 -0
  55. spring_runtime_mcp/replay_data/conformance/boot-2.7-servlet/startup.json +45 -0
  56. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/beans.json +92 -0
  57. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/conditions.json +52 -0
  58. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/configprops.json +20 -0
  59. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/env.json +16 -0
  60. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/flyway.json +40 -0
  61. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/health-v3.json +38 -0
  62. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/liquibase.json +30 -0
  63. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/mappings.json +40 -0
  64. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/openapi.json +54 -0
  65. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/source-catalog.json +90 -0
  66. spring_runtime_mcp/replay_data/conformance/boot-3.4-servlet/startup.json +45 -0
  67. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/beans.json +92 -0
  68. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/conditions.json +52 -0
  69. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/configprops.json +20 -0
  70. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/env.json +16 -0
  71. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/flyway.json +40 -0
  72. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/health-v3.json +38 -0
  73. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/liquibase.json +30 -0
  74. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/mappings.json +40 -0
  75. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/openapi.json +54 -0
  76. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/servlet-namespace-comparison.json +4 -0
  77. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/source-catalog.json +90 -0
  78. spring_runtime_mcp/replay_data/conformance/boot-4.1-webflux/startup.json +45 -0
  79. spring_runtime_mcp/replay_data/conformance/contracts/springboot_analyze_startup.json +62 -0
  80. spring_runtime_mcp/replay_data/conformance/contracts/springboot_check_migrations.json +63 -0
  81. spring_runtime_mcp/replay_data/conformance/contracts/springboot_detect_drift.json +64 -0
  82. spring_runtime_mcp/replay_data/conformance/contracts/springboot_diagnose_health.json +59 -0
  83. spring_runtime_mcp/replay_data/conformance/contracts/springboot_inspect_beans.json +56 -0
  84. spring_runtime_mcp/replay_data/conformance/contracts/springboot_inspect_config.json +62 -0
  85. spring_runtime_mcp/replay_data/conformance/contracts/springboot_search_openapi.json +80 -0
  86. spring_runtime_mcp/replay_data/conformance/contracts/springboot_verify_mappings.json +58 -0
  87. spring_runtime_mcp/replay_data/conformance/faults/cases.json +63 -0
  88. spring_runtime_mcp/replay_data/conformance/faults/health-hidden.expected.json +54 -0
  89. spring_runtime_mcp/replay_data/conformance/faults/health-hidden.json +3 -0
  90. spring_runtime_mcp/replay_data/conformance/large/beans-2500.json +22506 -0
  91. spring_runtime_mcp/replay_data/conformance/manifest.json +46 -0
  92. spring_runtime_mcp/schemas/tools-contract.json +1902 -0
  93. spring_runtime_mcp/server.py +322 -0
  94. spring_runtime_mcp/services.py +44 -0
  95. spring_runtime_mcp/snapshots.py +340 -0
  96. spring_runtime_mcp/tools/__init__.py +1 -0
  97. spring_runtime_mcp/tools/analyze_startup.py +79 -0
  98. spring_runtime_mcp/tools/check_migrations.py +99 -0
  99. spring_runtime_mcp/tools/detect_drift.py +323 -0
  100. spring_runtime_mcp/tools/diagnose_health.py +88 -0
  101. spring_runtime_mcp/tools/inspect_beans.py +479 -0
  102. spring_runtime_mcp/tools/inspect_config.py +102 -0
  103. spring_runtime_mcp/tools/registry.py +48 -0
  104. spring_runtime_mcp/tools/search_openapi.py +79 -0
  105. spring_runtime_mcp/tools/support.py +166 -0
  106. spring_runtime_mcp/tools/verify_mappings.py +62 -0
  107. spring_runtime_mcp/transport/__init__.py +1 -0
  108. spring_runtime_mcp/transport/actuator_http.py +459 -0
  109. spring_runtime_mcp/transport/bounded_json.py +144 -0
  110. spring_runtime_mcp/transport/replay_files.py +71 -0
  111. spring_runtime_mcp/transport/response_gate.py +186 -0
  112. spring_runtime_mcp/transport/responses.py +82 -0
  113. spring_runtime_mcp/transport/stdio.py +44 -0
  114. spring_runtime_mcp-0.2.0.dist-info/METADATA +320 -0
  115. spring_runtime_mcp-0.2.0.dist-info/RECORD +118 -0
  116. spring_runtime_mcp-0.2.0.dist-info/WHEEL +4 -0
  117. spring_runtime_mcp-0.2.0.dist-info/entry_points.txt +2 -0
  118. spring_runtime_mcp-0.2.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,56 @@
1
+ {
2
+ "schemaVersion": "2",
3
+ "status": "ok",
4
+ "source": {
5
+ "targetId": "local",
6
+ "snapshotId": "fixture-snapshot",
7
+ "observedAt": "2026-10-16T00:00:00Z",
8
+ "endpointIds": [
9
+ "beans"
10
+ ],
11
+ "bootVersion": null,
12
+ "adapterVersion": "fixture-1",
13
+ "policyVersion": "fixture-1"
14
+ },
15
+ "data": {
16
+ "items": [
17
+ {
18
+ "id": "item_1",
19
+ "endpointId": "beans",
20
+ "observationId": "fixture_observation",
21
+ "contextId": "application",
22
+ "parentContextId": "infrastructure",
23
+ "name": "orderService",
24
+ "type": "example.OrderService",
25
+ "scope": "singleton",
26
+ "resource": "classpath:example/OrderService.class",
27
+ "aliases": [],
28
+ "producer": null,
29
+ "dependencies": [],
30
+ "dependents": []
31
+ }
32
+ ],
33
+ "missingBeanAnalysis": {
34
+ "state": "notNeeded",
35
+ "conditions": [],
36
+ "blockingPaths": []
37
+ }
38
+ },
39
+ "totalMatched": 1,
40
+ "truncated": false,
41
+ "truncationReasons": [],
42
+ "coverage": {
43
+ "state": "complete",
44
+ "scope": "contract_fixture",
45
+ "gaps": []
46
+ },
47
+ "warnings": [],
48
+ "redactions": [],
49
+ "nextCursor": null,
50
+ "nextAction": {
51
+ "kind": "done",
52
+ "reasonCode": "COMPLETE",
53
+ "filterSuggestions": []
54
+ },
55
+ "errors": []
56
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "schemaVersion": "2",
3
+ "status": "ok",
4
+ "source": {
5
+ "targetId": "local",
6
+ "snapshotId": "fixture-snapshot",
7
+ "observedAt": "2026-10-16T00:00:00Z",
8
+ "endpointIds": [
9
+ "env"
10
+ ],
11
+ "bootVersion": null,
12
+ "adapterVersion": "fixture-1",
13
+ "policyVersion": "fixture-1"
14
+ },
15
+ "data": {
16
+ "activeProfiles": [
17
+ "dev"
18
+ ],
19
+ "items": [
20
+ {
21
+ "id": "item_1",
22
+ "endpointId": "env",
23
+ "observationId": "fixture_observation",
24
+ "contextId": null,
25
+ "parentContextId": null,
26
+ "propertyKey": "spring.application.name",
27
+ "prefix": "spring.application",
28
+ "configurationBean": null,
29
+ "effectiveValue": "orders",
30
+ "valueState": "visible",
31
+ "bindingValue": null,
32
+ "bindingState": "notReported",
33
+ "origin": {
34
+ "kind": "configurationFile",
35
+ "file": "application.yaml",
36
+ "line": 2,
37
+ "column": 9,
38
+ "environmentVariable": null
39
+ },
40
+ "sourceKind": "configurationFile",
41
+ "effective": "yes"
42
+ }
43
+ ]
44
+ },
45
+ "totalMatched": 1,
46
+ "truncated": false,
47
+ "truncationReasons": [],
48
+ "coverage": {
49
+ "state": "complete",
50
+ "scope": "contract_fixture",
51
+ "gaps": []
52
+ },
53
+ "warnings": [],
54
+ "redactions": [],
55
+ "nextCursor": null,
56
+ "nextAction": {
57
+ "kind": "done",
58
+ "reasonCode": "COMPLETE",
59
+ "filterSuggestions": []
60
+ },
61
+ "errors": []
62
+ }
@@ -0,0 +1,80 @@
1
+ {
2
+ "schemaVersion": "2",
3
+ "status": "partial",
4
+ "source": {
5
+ "targetId": "local",
6
+ "snapshotId": "fixture-snapshot",
7
+ "observedAt": "2026-10-16T00:00:00Z",
8
+ "endpointIds": [
9
+ "openapi"
10
+ ],
11
+ "bootVersion": null,
12
+ "adapterVersion": "fixture-1",
13
+ "policyVersion": "fixture-1"
14
+ },
15
+ "data": {
16
+ "openapiVersion": "3.0.3",
17
+ "candidateId": "default",
18
+ "items": [
19
+ {
20
+ "id": "item_1",
21
+ "endpointId": "openapi",
22
+ "observationId": "fixture_observation",
23
+ "kind": "operation",
24
+ "path": "/orders",
25
+ "httpMethod": "GET",
26
+ "operationId": "listOrders",
27
+ "schemaName": null,
28
+ "parameters": [],
29
+ "requestBody": [],
30
+ "responses": [
31
+ {
32
+ "status": "200",
33
+ "mediaType": "application/json",
34
+ "schema": {
35
+ "type": "object",
36
+ "properties": {
37
+ "customer": {
38
+ "type": "object",
39
+ "properties": {
40
+ "address": {
41
+ "type": "object"
42
+ }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+ ],
49
+ "schema": null,
50
+ "expansionComplete": false
51
+ }
52
+ ]
53
+ },
54
+ "totalMatched": 1,
55
+ "truncated": true,
56
+ "truncationReasons": [
57
+ "REF_DEPTH_LIMIT"
58
+ ],
59
+ "coverage": {
60
+ "state": "partial",
61
+ "scope": "contract_fixture",
62
+ "gaps": [
63
+ "REF_DEPTH_LIMIT"
64
+ ]
65
+ },
66
+ "warnings": [],
67
+ "redactions": [],
68
+ "nextCursor": null,
69
+ "nextAction": {
70
+ "kind": "refine",
71
+ "reasonCode": "REF_DEPTH_LIMIT",
72
+ "filterSuggestions": [
73
+ {
74
+ "parameter": "schemaName",
75
+ "value": "Address"
76
+ }
77
+ ]
78
+ },
79
+ "errors": []
80
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "schemaVersion": "2",
3
+ "status": "ok",
4
+ "source": {
5
+ "targetId": "local",
6
+ "snapshotId": "fixture-snapshot",
7
+ "observedAt": "2026-10-16T00:00:00Z",
8
+ "endpointIds": [
9
+ "mappings"
10
+ ],
11
+ "bootVersion": null,
12
+ "adapterVersion": "fixture-1",
13
+ "policyVersion": "fixture-1"
14
+ },
15
+ "data": {
16
+ "items": [
17
+ {
18
+ "id": "item_1",
19
+ "endpointId": "mappings",
20
+ "observationId": "fixture_observation",
21
+ "contextId": "application",
22
+ "parentContextId": null,
23
+ "stack": "mvc",
24
+ "dispatcherName": "dispatcherServlet",
25
+ "paths": [
26
+ "/orders"
27
+ ],
28
+ "httpMethods": [
29
+ "GET"
30
+ ],
31
+ "methodsUnrestricted": false,
32
+ "controllerClass": "example.OrderController",
33
+ "handlerMethod": "list",
34
+ "descriptor": "(Ljakarta/servlet/http/HttpServletRequest;)Ljava/lang/String;",
35
+ "handlerKind": "method",
36
+ "conditions": [],
37
+ "matchingComplete": true
38
+ }
39
+ ]
40
+ },
41
+ "totalMatched": 1,
42
+ "truncated": false,
43
+ "truncationReasons": [],
44
+ "coverage": {
45
+ "state": "complete",
46
+ "scope": "contract_fixture",
47
+ "gaps": []
48
+ },
49
+ "warnings": [],
50
+ "redactions": [],
51
+ "nextCursor": null,
52
+ "nextAction": {
53
+ "kind": "done",
54
+ "reasonCode": "COMPLETE",
55
+ "filterSuggestions": []
56
+ },
57
+ "errors": []
58
+ }
@@ -0,0 +1,63 @@
1
+ [
2
+ {
3
+ "id": "connection-refused",
4
+ "endpointId": "beans",
5
+ "error": "ECONNREFUSED"
6
+ },
7
+ {
8
+ "id": "read-timeout",
9
+ "endpointId": "beans",
10
+ "error": "ETIMEDOUT"
11
+ },
12
+ {
13
+ "id": "not-exposed",
14
+ "endpointId": "beans",
15
+ "status": 404,
16
+ "contentType": "application/json",
17
+ "body": {
18
+ "status": 404
19
+ }
20
+ },
21
+ {
22
+ "id": "startup-unavailable",
23
+ "endpointId": "startup",
24
+ "status": 404,
25
+ "contentType": "application/json",
26
+ "body": {
27
+ "status": 404
28
+ }
29
+ },
30
+ {
31
+ "id": "unauthorized",
32
+ "endpointId": "beans",
33
+ "status": 401,
34
+ "contentType": "text/html",
35
+ "body": "<html>unauthorized</html>"
36
+ },
37
+ {
38
+ "id": "forbidden",
39
+ "endpointId": "beans",
40
+ "status": 403,
41
+ "contentType": "application/json",
42
+ "body": {}
43
+ },
44
+ {
45
+ "id": "login-redirect",
46
+ "endpointId": "beans",
47
+ "status": 302,
48
+ "headers": {
49
+ "Location": "/login"
50
+ },
51
+ "contentType": "text/html",
52
+ "body": "<html>login</html>"
53
+ },
54
+ {
55
+ "id": "health-hidden",
56
+ "endpointId": "health",
57
+ "status": 200,
58
+ "contentType": "application/vnd.spring-boot.actuator.v3+json",
59
+ "body": {
60
+ "status": "DOWN"
61
+ }
62
+ }
63
+ ]
@@ -0,0 +1,54 @@
1
+ {
2
+ "schemaVersion": "2",
3
+ "status": "partial",
4
+ "source": {
5
+ "targetId": "local",
6
+ "snapshotId": "fixture-snapshot",
7
+ "observedAt": "2026-10-16T00:00:00Z",
8
+ "endpointIds": [
9
+ "health"
10
+ ],
11
+ "bootVersion": null,
12
+ "adapterVersion": "fixture-1",
13
+ "policyVersion": "fixture-1"
14
+ },
15
+ "data": {
16
+ "overallStatus": "DOWN",
17
+ "activeGroup": "application",
18
+ "items": [
19
+ {
20
+ "id": "item_1",
21
+ "endpointId": "health",
22
+ "observationId": "fixture_observation",
23
+ "componentPath": [],
24
+ "parentId": null,
25
+ "status": "DOWN",
26
+ "details": [],
27
+ "errorType": null,
28
+ "remediationCodes": [
29
+ "REVIEW_HEALTH_DETAILS_VISIBILITY"
30
+ ],
31
+ "childrenComplete": false
32
+ }
33
+ ]
34
+ },
35
+ "totalMatched": 1,
36
+ "truncated": false,
37
+ "truncationReasons": [],
38
+ "coverage": {
39
+ "state": "partial",
40
+ "scope": "contract_fixture",
41
+ "gaps": [
42
+ "HEALTH_DETAILS_NOT_VISIBLE"
43
+ ]
44
+ },
45
+ "warnings": [],
46
+ "redactions": [],
47
+ "nextCursor": null,
48
+ "nextAction": {
49
+ "kind": "remediate",
50
+ "reasonCode": "HEALTH_DETAILS_NOT_VISIBLE",
51
+ "filterSuggestions": []
52
+ },
53
+ "errors": []
54
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "status": "DOWN"
3
+ }