forge-doctor-api 0.2.0__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.
- forge_doctor_api-0.2.0/LICENSE +21 -0
- forge_doctor_api-0.2.0/PKG-INFO +209 -0
- forge_doctor_api-0.2.0/README.md +187 -0
- forge_doctor_api-0.2.0/pyproject.toml +93 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/__init__.py +69 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/__main__.py +3 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/_graphstudio.py +376 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/_graphview.py +181 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/__init__.py +0 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/asyncapi/__init__.py +39 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/asyncapi/compat.py +274 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/asyncapi/graph.py +116 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/asyncapi/knowledge.py +60 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/asyncapi/model.py +143 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/asyncapi/parser.py +512 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/cache/__init__.py +17 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/cache/graph.py +256 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/cache/model.py +66 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/cache/scan.py +192 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/clients/__init__.py +19 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/clients/graph.py +57 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/clients/graphql_doc.py +105 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/clients/java.py +139 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/clients/javascript.py +214 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/clients/model.py +83 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/clients/python.py +337 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/clients/scan.py +72 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/gateway/__init__.py +25 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/gateway/model.py +128 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/gateway/parser.py +572 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/graphql/__init__.py +49 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/graphql/client.py +164 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/graphql/compat.py +228 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/graphql/graph.py +105 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/graphql/model.py +180 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/graphql/parser.py +423 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/graphql/shape.py +149 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/grpc/__init__.py +51 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/grpc/compat.py +288 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/grpc/graph.py +84 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/grpc/model.py +150 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/grpc/parser.py +406 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/grpc/reliability.py +130 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/iac/__init__.py +21 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/iac/cloudformation.py +152 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/iac/graph.py +65 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/iac/hcl.py +184 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/iac/model.py +81 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/iac/parser.py +216 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/openapi/__init__.py +76 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/openapi/detection.py +63 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/openapi/graph.py +171 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/openapi/identity.py +44 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/openapi/knowledge.py +59 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/openapi/loader.py +290 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/openapi/model.py +355 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/openapi/parser.py +952 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/openapi/refs.py +151 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/openapi/shape.py +81 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/routes/__init__.py +33 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/routes/adapter.py +291 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/routes/fastapi.py +971 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/routes/graph.py +101 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/routes/javascript.py +977 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/routes/model.py +122 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/routes/spring.py +541 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/routes/textscan.py +102 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/runtime/__init__.py +53 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/runtime/accesslog.py +68 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/runtime/adapter.py +32 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/runtime/aggregate.py +224 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/runtime/execution.py +408 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/runtime/graph.py +93 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/runtime/history.py +103 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/runtime/loader.py +283 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/runtime/model.py +100 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/runtime/otlp.py +211 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/runtime/stream.py +301 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/version/__init__.py +19 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/version/detect.py +242 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/analyzers/version/model.py +71 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/change/__init__.py +41 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/change/baseline.py +51 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/change/blast.py +178 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/change/events.py +372 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/change/model.py +125 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/change/pr.py +56 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/__init__.py +1 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/apisec/__init__.py +5 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/apisec/catalog.py +172 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/apisec/engine.py +549 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/asyncapi/__init__.py +14 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/asyncapi/catalog.py +87 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/asyncapi/engine.py +374 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/client/__init__.py +16 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/client/catalog.py +41 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/client/engine.py +215 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/compat/__init__.py +27 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/compat/catalog.py +125 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/compat/engine.py +982 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/compat/fingerprint.py +116 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/drift/__init__.py +38 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/drift/catalog.py +150 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/drift/engine.py +608 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/drift/error_contract.py +127 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/graphql/__init__.py +15 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/graphql/catalog.py +150 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/graphql/engine.py +300 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/grpc/__init__.py +15 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/grpc/catalog.py +115 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/grpc/engine.py +217 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/oas/__init__.py +6 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/oas/catalog.py +271 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/oas/engine.py +766 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/observability/__init__.py +6 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/observability/catalog.py +75 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/observability/engine.py +159 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/perf/__init__.py +5 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/perf/catalog.py +104 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/perf/engine.py +299 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/relapi/__init__.py +5 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/relapi/catalog.py +124 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/checks/relapi/engine.py +418 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/cli/__init__.py +1596 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/cli/catalog.py +131 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/contracts/__init__.py +90 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/contracts/adapters.py +336 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/contracts/models.py +658 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/contracts/schemas.py +244 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/contracts/validate.py +114 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/contracts/version.py +73 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/core/__init__.py +1 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/core/cache.py +115 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/core/context.py +105 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/core/discovery.py +317 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/core/evidence_store.py +138 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/core/export.py +53 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/core/gate.py +101 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/core/graph.py +387 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/core/models.py +682 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/core/plan.py +186 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/core/redaction.py +106 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/core/report.py +26 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/core/stats.py +94 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/diagnose/__init__.py +23 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/diagnose/engine.py +328 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/diagnose/model.py +87 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/fleet/__init__.py +32 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/fleet/collect.py +156 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/fleet/model.py +130 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/fleet/report.py +503 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/graphview.py +84 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/handoff/__init__.py +31 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/handoff/boundary.py +215 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/handoff/bundle.py +202 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/handoff/context.py +281 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/handoff/decision.py +72 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/handoff/delta.py +197 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/handoff/mcp.py +259 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/handoff/mcp_server.py +274 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/handoff/model.py +217 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/handoff/protocol.py +336 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/handoff/routing.py +84 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/integrations/__init__.py +0 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/__init__.py +77 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/asyncapi/__init__.py +1 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/asyncapi/versions.yaml +38 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/capability.py +314 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/frameworks/__init__.py +1 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/frameworks/express.yaml +17 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/frameworks/fastapi.yaml +17 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/frameworks/spring.yaml +17 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/gateways/__init__.py +1 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/gateways/aws-api-gateway.yaml +16 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/gateways/capability-map.yaml +41 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/gateways/envoy.yaml +17 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/gateways/kong.yaml +15 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/gateways/nginx.yaml +15 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/graphql/__init__.py +1 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/graphql/spec.yaml +30 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/grpc/__init__.py +1 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/grpc/behaviors.yaml +69 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/http/__init__.py +1 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/http/semantics.yaml +27 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/jsonschema/__init__.py +1 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/jsonschema/dialects.yaml +30 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/loader.py +131 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/manifest.py +229 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/model.py +122 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/openapi/__init__.py +1 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/openapi/versions.yaml +54 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/security/__init__.py +0 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/knowledge/security/owasp_api_top10.yaml +98 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/lab/__init__.py +42 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/lab/capabilities.py +81 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/lab/loader.py +114 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/lab/model.py +246 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/lab/report.py +283 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/lab/runner.py +299 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/migrate/__init__.py +41 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/migrate/engine.py +885 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/migrate/graph.py +263 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/migrate/model.py +124 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/output/__init__.py +17 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/output/writers.py +140 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/perf/__init__.py +100 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/perf/baseline.py +186 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/perf/budget.py +100 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/perf/capacity.py +244 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/perf/correlation.py +91 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/perf/criticalpath.py +140 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/perf/experiments.py +215 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/perf/fanout.py +144 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/perf/payload.py +72 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/perf/signals.py +152 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/perf/stats.py +70 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/plugins/__init__.py +51 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/plugins/conformance.py +221 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/plugins/manifest.py +181 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/plugins/registry.py +129 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/plugins/sdk.py +96 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/plugins/trust.py +92 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/plugins/validation.py +197 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/policy/__init__.py +37 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/policy/engine.py +112 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/policy/loader.py +208 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/policy/model.py +116 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/policy/ownership.py +140 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/policy/rules.py +255 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/py.typed +1 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/reliability/__init__.py +50 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/reliability/config.py +661 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/reliability/idempotency.py +46 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/reliability/model.py +180 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/reliability/retry.py +93 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/reliability/slo.py +94 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/reliability/timeout.py +84 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/report.py +83 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/safefix/__init__.py +27 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/safefix/classify.py +52 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/safefix/model.py +74 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/safefix/rules.py +123 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/scan.py +854 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/sdk.py +205 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/security/__init__.py +43 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/security/knowledge.py +29 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/security/model.py +257 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/security/scan.py +1012 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/service_graph.py +48 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/temporal.py +247 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/twin/__init__.py +25 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/twin/assemble.py +266 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/twin/drift.py +364 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/twin/model.py +117 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/ui/__init__.py +28 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/ui/app.py +529 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/ui/home.py +175 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/ui/i18n.py +143 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/ui/kit.py +689 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/ui/screen.py +648 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/ui/tui.py +124 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/ui/wizard.py +309 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/workspace/__init__.py +36 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/workspace/impact.py +134 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/workspace/links.py +319 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/workspace/loader.py +123 -0
- forge_doctor_api-0.2.0/src/forge_doctor_api/workspace/model.py +105 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Edgar Sócrates Caria
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: forge-doctor-api
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Deterministic, offline-first, evidence-first API architecture intelligence engine.
|
|
5
|
+
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Author: Edgar Sócrates Caria
|
|
8
|
+
Requires-Python: >=3.11
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Provides-Extra: graphql
|
|
14
|
+
Provides-Extra: mcp
|
|
15
|
+
Requires-Dist: graphql-core (>=3.2,<4) ; extra == "graphql"
|
|
16
|
+
Requires-Dist: mcp (>=2.0,<3) ; extra == "mcp"
|
|
17
|
+
Requires-Dist: pyyaml (>=6.0)
|
|
18
|
+
Requires-Dist: rich (>=15.0.0)
|
|
19
|
+
Requires-Dist: typer (>=0.12)
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
> Instalação portátil: [`docs/installation/quickstart.md`](docs/installation/quickstart.md) — clone → setup → install. Delegação agêntica: [forge.agentic.json](forge.agentic.json) (SpecialistAgenticManifest/v1).
|
|
24
|
+
> Docs: [commands](docs/reference/commands.md) · [skills](docs/reference/skills.md) · [agents](docs/reference/agents.md) · [tutorial](docs/tutorials/first-run.md) · [economy](docs/economy.md) · [troubleshooting](docs/installation/troubleshooting.md)
|
|
25
|
+
<p align="center">
|
|
26
|
+
<img src="docs/assets/logo.png" alt="Forge Doctor API" width="440">
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
# Forge Doctor API
|
|
30
|
+
|
|
31
|
+
Deterministic, offline-first, evidence-first engine for API architecture
|
|
32
|
+
intelligence.
|
|
33
|
+
|
|
34
|
+
Forge Doctor ("the Doctor") inspects API projects — contracts, source
|
|
35
|
+
code, configuration, and exported runtime artifacts — and produces
|
|
36
|
+
structured, evidence-bearing findings. It never calls a model, never
|
|
37
|
+
fetches a URL, and never guesses: anything it cannot establish from
|
|
38
|
+
local evidence is surfaced as an explicit `UnknownFact`.
|
|
39
|
+
|
|
40
|
+
Status: `0.2.0` — the full deterministic surface is implemented (scan,
|
|
41
|
+
diff, diagnose, inventory, lab, handoff). This is **not** a stable public
|
|
42
|
+
API commitment; interfaces may still change before 1.0.
|
|
43
|
+
|
|
44
|
+
## Design principles
|
|
45
|
+
|
|
46
|
+
| Principle | What it means in practice |
|
|
47
|
+
|---|---|
|
|
48
|
+
| Deterministic | Same inputs → byte-identical findings, ordering, and exports. No LLM calls anywhere. |
|
|
49
|
+
| Offline-first | Zero network access. Host interaction happens only through `ProjectContext`. Tests hard-block sockets. |
|
|
50
|
+
| Evidence-first | Every finding carries `Evidence` (file + line + summary) and a `Confidence` (`HIGH`/`MEDIUM`/`LOW`/`UNKNOWN`). |
|
|
51
|
+
| Low false positives | Passive/absence-of-evidence cases are emitted as *candidates*, never as verdicts. |
|
|
52
|
+
| Explicit unknowns | Missing files, unresolvable references, dynamic code → `UnknownFact` records, not silence. |
|
|
53
|
+
| Portable | Pure Python, no platform-specific imports; supports Python 3.11/3.12/3.13 on Linux/Windows/macOS. |
|
|
54
|
+
|
|
55
|
+
The Doctor is the **deterministic** half of the Forge product family:
|
|
56
|
+
it observes and classifies. Agentic code generation lives in `api-forge`
|
|
57
|
+
(a separate project); this repository has no dependency on it.
|
|
58
|
+
|
|
59
|
+
## Installation
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pip install . # runtime deps: typer, rich, pyyaml
|
|
63
|
+
pip install .[graphql] # optional: graphql-core for GraphQL parsing
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Requirements: Python >= 3.11. For development:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pip install pytest ruff mypy types-PyYAML build
|
|
70
|
+
python -m pytest -q
|
|
71
|
+
python -m ruff check .
|
|
72
|
+
python -m mypy src
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Portable install (Forge contract)
|
|
76
|
+
|
|
77
|
+
The checkout also carries the Forge family's portable-installation
|
|
78
|
+
contract — clone once, setup once:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
./setup.sh # or .\setup.ps1 — venv + wheel + ~/.forge registry
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Installing the Forge into a *consumer* project (managed `.mcp.json` key +
|
|
85
|
+
`AGENTS.md` marker block, sha256-ledgered) is deliberately a **checkout
|
|
86
|
+
script**, not a `forge-doctor-api` verb: the package boundary bans
|
|
87
|
+
`os`/`subprocess` imports across `src/` and the 0.2.0 RC window forbids
|
|
88
|
+
new CLI commands. Same verbs, same receipts as sibling forges:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
python scripts/forge_install.py install --dry-run # plan only
|
|
92
|
+
python scripts/forge_install.py install --yes # apply to a repo
|
|
93
|
+
python scripts/forge_install.py status|doctor|repair
|
|
94
|
+
python scripts/forge_install.py uninstall [--purge]
|
|
95
|
+
python scripts/forge_install.py update|mcp-verify
|
|
96
|
+
|
|
97
|
+
# Optional local web UI over the same real services (127.0.0.1, session token)
|
|
98
|
+
python scripts/forge_portal.py [--no-browser] [--port N] [--root DIR]
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`theforge install auto` delegates here automatically via the
|
|
102
|
+
`install_command` field in `forge.json`.
|
|
103
|
+
|
|
104
|
+
## Quickstart
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Full deterministic scan of a project directory
|
|
108
|
+
forge-doctor-api scan ./my-service
|
|
109
|
+
|
|
110
|
+
# Scan + CI gate: fail on new breaking changes vs a baseline contract
|
|
111
|
+
forge-doctor-api scan ./my-service --fail-on breaking --baseline ./last-release
|
|
112
|
+
|
|
113
|
+
# Emit SARIF for GitHub code scanning, or a compact agent-readable format
|
|
114
|
+
forge-doctor-api scan . --format sarif --out results.sarif
|
|
115
|
+
forge-doctor-api scan . --format agent
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Exit codes: `0` scan ran and gate passed · `1` gate failed ·
|
|
119
|
+
`2` usage/misconfiguration error.
|
|
120
|
+
|
|
121
|
+
## Command tour
|
|
122
|
+
|
|
123
|
+
```text
|
|
124
|
+
forge-doctor-api scan TARGET all pipelines + optional §178 gate
|
|
125
|
+
forge-doctor-api inventory TARGET fleet answers over a workspace or repo
|
|
126
|
+
forge-doctor-api diff OLD NEW semantic contract diff + typed events
|
|
127
|
+
forge-doctor-api diff OLD NEW --pr + PR-intel summary and blast radius
|
|
128
|
+
forge-doctor-api fingerprint FILE semantic fingerprint of a contract
|
|
129
|
+
forge-doctor-api graph TARGET merged contract/route/client graph
|
|
130
|
+
forge-doctor-api blast-radius O N operation → clients → services impact
|
|
131
|
+
forge-doctor-api diagnose TARGET root-cause episodes from evidence
|
|
132
|
+
forge-doctor-api explain DIR TOKEN evidence chain for one finding
|
|
133
|
+
forge-doctor-api lab [labs] Forge Lab corpus: precision/recall
|
|
134
|
+
forge-doctor-api contract diff O N contract-level diff
|
|
135
|
+
forge-doctor-api contract compat … compatibility classification
|
|
136
|
+
forge-doctor-api runtime requests per-request execution table
|
|
137
|
+
forge-doctor-api runtime baseline performance baselines per endpoint
|
|
138
|
+
forge-doctor-api runtime regress… regressions vs baseline
|
|
139
|
+
forge-doctor-api security inspect passive security evidence + findings
|
|
140
|
+
forge-doctor-api reliability inspect timeouts/retries/idempotency/SLOs
|
|
141
|
+
forge-doctor-api reliability path hop-by-hop effective policy
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
`--help` on any command lists its options. See
|
|
145
|
+
[docs/cli.md](docs/cli.md) for the full reference.
|
|
146
|
+
|
|
147
|
+
## What it understands
|
|
148
|
+
|
|
149
|
+
- **Contracts**: OpenAPI 3.x (YAML/JSON), AsyncAPI, GraphQL SDL +
|
|
150
|
+
introspection, gRPC `.proto`.
|
|
151
|
+
- **Source**: FastAPI route discovery, client call-site extraction
|
|
152
|
+
(Python/JS/TS), GraphQL client queries (`gql` tagged literals).
|
|
153
|
+
- **Config**: timeouts, retries, rate limits, idempotency headers,
|
|
154
|
+
authentication/CORS/mTLS/TLS evidence, gateway routes, ownership
|
|
155
|
+
files, policy files.
|
|
156
|
+
- **Runtime**: OTLP/OTEL JSON traces, access-log records — ingested as
|
|
157
|
+
compact per-request summaries (raw spans are not retained).
|
|
158
|
+
|
|
159
|
+
From those inputs it produces: OAS/ASYNC/GQL/GRPC contract checks,
|
|
160
|
+
contract-drift and semantic compatibility diffs, client impact and blast
|
|
161
|
+
radius, versioning/deprecation analysis, observability + performance
|
|
162
|
+
regression findings, reliability checks (retry amplification, SLO
|
|
163
|
+
budgets), passive OWASP API Top-10 candidates, policy violations, an API
|
|
164
|
+
digital twin, root-cause diagnosis, safe-fix classification, multi-repo
|
|
165
|
+
workspace analysis, fleet intelligence, migration portability
|
|
166
|
+
assessments, and compact handoff bundles for agentic tools.
|
|
167
|
+
|
|
168
|
+
## Documentation
|
|
169
|
+
|
|
170
|
+
- [docs/architecture.md](docs/architecture.md) — pipeline layout, models, determinism contract
|
|
171
|
+
- [docs/cli.md](docs/cli.md) — every command, option, and exit code
|
|
172
|
+
- [docs/output-formats.md](docs/output-formats.md) — console/JSON/JSONL/SARIF/agent + CI gate
|
|
173
|
+
- [docs/checks.md](docs/checks.md) — finding model, namespaces, confidence semantics
|
|
174
|
+
- [docs/compatibility.md](docs/compatibility.md) — cross-protocol diff taxonomy, decision tables, client-impact coverage
|
|
175
|
+
- [docs/runtime-evidence.md](docs/runtime-evidence.md) — trace/log ingestion, history, perf & SLOs
|
|
176
|
+
- [docs/runtime-scale.md](docs/runtime-scale.md) — streaming bounds, memory curve, perf budget gate, snapshot formats
|
|
177
|
+
- [docs/policies.md](docs/policies.md) — policy files, inheritance, exceptions, ownership
|
|
178
|
+
- [docs/workspace-fleet.md](docs/workspace-fleet.md) — multi-repo manifests + inventory
|
|
179
|
+
- [docs/knowledge-packs.md](docs/knowledge-packs.md) — versioned knowledge data + plugin SDK
|
|
180
|
+
- [docs/migration.md](docs/migration.md) — portability assessments + decision briefs
|
|
181
|
+
- [docs/handoff.md](docs/handoff.md) — `ApiHandoffBundle`, `DoctorApi`, Forger routing
|
|
182
|
+
- [docs/infrastructure.md](docs/infrastructure.md) — gateway/mesh declared config + Kubernetes/IaC evidence
|
|
183
|
+
- [docs/cache.md](docs/cache.md) — declared cache policies, layers, invalidation risk
|
|
184
|
+
- [docs/lab.md](docs/lab.md) — Forge Lab corpus, ground truth, precision/recall
|
|
185
|
+
- [docs/output-contract.md](docs/output-contract.md) — v1 export schemas (json/jsonl/sarif/agent/report) + evolution rules
|
|
186
|
+
- [docs/forger-boundary.md](docs/forger-boundary.md) — Doctor ↔ API Forge ↔ The Forger typed boundary
|
|
187
|
+
- [docs/release-policy.md](docs/release-policy.md) — versioning, public surfaces, release checklist, SBOM
|
|
188
|
+
- [docs/release-v0.1.md](docs/release-v0.1.md) — quality gate, packaging, hermetic proofs
|
|
189
|
+
- [docs/roadmap.md](docs/roadmap.md) — shipped coverage vs planned waves
|
|
190
|
+
- [docs/adr/](docs/adr/) — architecture decision records
|
|
191
|
+
- [docs/development.md](docs/development.md) — repo layout, test/lint/typecheck, adding a check
|
|
192
|
+
|
|
193
|
+
## Repository layout
|
|
194
|
+
|
|
195
|
+
```text
|
|
196
|
+
src/forge_doctor_api/ engine (analyzers, checks, models, CLI)
|
|
197
|
+
tests/ pytest suite (offline-blocked sockets)
|
|
198
|
+
labs/ Forge Lab corpus: golden + adversarial fixtures
|
|
199
|
+
factory/ Loop Factory specs, run records, quality gate
|
|
200
|
+
.github/workflows/ doctor-scan.yml CI gate
|
|
201
|
+
docs/ documentation
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## Graph Studio
|
|
205
|
+
|
|
206
|
+
`forge-doctor-api graph . --view|--ui` projects the service graph through
|
|
207
|
+
`forge/ForgeGraphView/v1` and serves the embedded local explorer (declinable at
|
|
208
|
+
install via `--components`). Full docs: `the-forge/docs/graph-studio/`.
|
|
209
|
+
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
|
|
2
|
+
> Instalação portátil: [`docs/installation/quickstart.md`](docs/installation/quickstart.md) — clone → setup → install. Delegação agêntica: [forge.agentic.json](forge.agentic.json) (SpecialistAgenticManifest/v1).
|
|
3
|
+
> Docs: [commands](docs/reference/commands.md) · [skills](docs/reference/skills.md) · [agents](docs/reference/agents.md) · [tutorial](docs/tutorials/first-run.md) · [economy](docs/economy.md) · [troubleshooting](docs/installation/troubleshooting.md)
|
|
4
|
+
<p align="center">
|
|
5
|
+
<img src="docs/assets/logo.png" alt="Forge Doctor API" width="440">
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
# Forge Doctor API
|
|
9
|
+
|
|
10
|
+
Deterministic, offline-first, evidence-first engine for API architecture
|
|
11
|
+
intelligence.
|
|
12
|
+
|
|
13
|
+
Forge Doctor ("the Doctor") inspects API projects — contracts, source
|
|
14
|
+
code, configuration, and exported runtime artifacts — and produces
|
|
15
|
+
structured, evidence-bearing findings. It never calls a model, never
|
|
16
|
+
fetches a URL, and never guesses: anything it cannot establish from
|
|
17
|
+
local evidence is surfaced as an explicit `UnknownFact`.
|
|
18
|
+
|
|
19
|
+
Status: `0.2.0` — the full deterministic surface is implemented (scan,
|
|
20
|
+
diff, diagnose, inventory, lab, handoff). This is **not** a stable public
|
|
21
|
+
API commitment; interfaces may still change before 1.0.
|
|
22
|
+
|
|
23
|
+
## Design principles
|
|
24
|
+
|
|
25
|
+
| Principle | What it means in practice |
|
|
26
|
+
|---|---|
|
|
27
|
+
| Deterministic | Same inputs → byte-identical findings, ordering, and exports. No LLM calls anywhere. |
|
|
28
|
+
| Offline-first | Zero network access. Host interaction happens only through `ProjectContext`. Tests hard-block sockets. |
|
|
29
|
+
| Evidence-first | Every finding carries `Evidence` (file + line + summary) and a `Confidence` (`HIGH`/`MEDIUM`/`LOW`/`UNKNOWN`). |
|
|
30
|
+
| Low false positives | Passive/absence-of-evidence cases are emitted as *candidates*, never as verdicts. |
|
|
31
|
+
| Explicit unknowns | Missing files, unresolvable references, dynamic code → `UnknownFact` records, not silence. |
|
|
32
|
+
| Portable | Pure Python, no platform-specific imports; supports Python 3.11/3.12/3.13 on Linux/Windows/macOS. |
|
|
33
|
+
|
|
34
|
+
The Doctor is the **deterministic** half of the Forge product family:
|
|
35
|
+
it observes and classifies. Agentic code generation lives in `api-forge`
|
|
36
|
+
(a separate project); this repository has no dependency on it.
|
|
37
|
+
|
|
38
|
+
## Installation
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
pip install . # runtime deps: typer, rich, pyyaml
|
|
42
|
+
pip install .[graphql] # optional: graphql-core for GraphQL parsing
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Requirements: Python >= 3.11. For development:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install pytest ruff mypy types-PyYAML build
|
|
49
|
+
python -m pytest -q
|
|
50
|
+
python -m ruff check .
|
|
51
|
+
python -m mypy src
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Portable install (Forge contract)
|
|
55
|
+
|
|
56
|
+
The checkout also carries the Forge family's portable-installation
|
|
57
|
+
contract — clone once, setup once:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
./setup.sh # or .\setup.ps1 — venv + wheel + ~/.forge registry
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Installing the Forge into a *consumer* project (managed `.mcp.json` key +
|
|
64
|
+
`AGENTS.md` marker block, sha256-ledgered) is deliberately a **checkout
|
|
65
|
+
script**, not a `forge-doctor-api` verb: the package boundary bans
|
|
66
|
+
`os`/`subprocess` imports across `src/` and the 0.2.0 RC window forbids
|
|
67
|
+
new CLI commands. Same verbs, same receipts as sibling forges:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
python scripts/forge_install.py install --dry-run # plan only
|
|
71
|
+
python scripts/forge_install.py install --yes # apply to a repo
|
|
72
|
+
python scripts/forge_install.py status|doctor|repair
|
|
73
|
+
python scripts/forge_install.py uninstall [--purge]
|
|
74
|
+
python scripts/forge_install.py update|mcp-verify
|
|
75
|
+
|
|
76
|
+
# Optional local web UI over the same real services (127.0.0.1, session token)
|
|
77
|
+
python scripts/forge_portal.py [--no-browser] [--port N] [--root DIR]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`theforge install auto` delegates here automatically via the
|
|
81
|
+
`install_command` field in `forge.json`.
|
|
82
|
+
|
|
83
|
+
## Quickstart
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
# Full deterministic scan of a project directory
|
|
87
|
+
forge-doctor-api scan ./my-service
|
|
88
|
+
|
|
89
|
+
# Scan + CI gate: fail on new breaking changes vs a baseline contract
|
|
90
|
+
forge-doctor-api scan ./my-service --fail-on breaking --baseline ./last-release
|
|
91
|
+
|
|
92
|
+
# Emit SARIF for GitHub code scanning, or a compact agent-readable format
|
|
93
|
+
forge-doctor-api scan . --format sarif --out results.sarif
|
|
94
|
+
forge-doctor-api scan . --format agent
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Exit codes: `0` scan ran and gate passed · `1` gate failed ·
|
|
98
|
+
`2` usage/misconfiguration error.
|
|
99
|
+
|
|
100
|
+
## Command tour
|
|
101
|
+
|
|
102
|
+
```text
|
|
103
|
+
forge-doctor-api scan TARGET all pipelines + optional §178 gate
|
|
104
|
+
forge-doctor-api inventory TARGET fleet answers over a workspace or repo
|
|
105
|
+
forge-doctor-api diff OLD NEW semantic contract diff + typed events
|
|
106
|
+
forge-doctor-api diff OLD NEW --pr + PR-intel summary and blast radius
|
|
107
|
+
forge-doctor-api fingerprint FILE semantic fingerprint of a contract
|
|
108
|
+
forge-doctor-api graph TARGET merged contract/route/client graph
|
|
109
|
+
forge-doctor-api blast-radius O N operation → clients → services impact
|
|
110
|
+
forge-doctor-api diagnose TARGET root-cause episodes from evidence
|
|
111
|
+
forge-doctor-api explain DIR TOKEN evidence chain for one finding
|
|
112
|
+
forge-doctor-api lab [labs] Forge Lab corpus: precision/recall
|
|
113
|
+
forge-doctor-api contract diff O N contract-level diff
|
|
114
|
+
forge-doctor-api contract compat … compatibility classification
|
|
115
|
+
forge-doctor-api runtime requests per-request execution table
|
|
116
|
+
forge-doctor-api runtime baseline performance baselines per endpoint
|
|
117
|
+
forge-doctor-api runtime regress… regressions vs baseline
|
|
118
|
+
forge-doctor-api security inspect passive security evidence + findings
|
|
119
|
+
forge-doctor-api reliability inspect timeouts/retries/idempotency/SLOs
|
|
120
|
+
forge-doctor-api reliability path hop-by-hop effective policy
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
`--help` on any command lists its options. See
|
|
124
|
+
[docs/cli.md](docs/cli.md) for the full reference.
|
|
125
|
+
|
|
126
|
+
## What it understands
|
|
127
|
+
|
|
128
|
+
- **Contracts**: OpenAPI 3.x (YAML/JSON), AsyncAPI, GraphQL SDL +
|
|
129
|
+
introspection, gRPC `.proto`.
|
|
130
|
+
- **Source**: FastAPI route discovery, client call-site extraction
|
|
131
|
+
(Python/JS/TS), GraphQL client queries (`gql` tagged literals).
|
|
132
|
+
- **Config**: timeouts, retries, rate limits, idempotency headers,
|
|
133
|
+
authentication/CORS/mTLS/TLS evidence, gateway routes, ownership
|
|
134
|
+
files, policy files.
|
|
135
|
+
- **Runtime**: OTLP/OTEL JSON traces, access-log records — ingested as
|
|
136
|
+
compact per-request summaries (raw spans are not retained).
|
|
137
|
+
|
|
138
|
+
From those inputs it produces: OAS/ASYNC/GQL/GRPC contract checks,
|
|
139
|
+
contract-drift and semantic compatibility diffs, client impact and blast
|
|
140
|
+
radius, versioning/deprecation analysis, observability + performance
|
|
141
|
+
regression findings, reliability checks (retry amplification, SLO
|
|
142
|
+
budgets), passive OWASP API Top-10 candidates, policy violations, an API
|
|
143
|
+
digital twin, root-cause diagnosis, safe-fix classification, multi-repo
|
|
144
|
+
workspace analysis, fleet intelligence, migration portability
|
|
145
|
+
assessments, and compact handoff bundles for agentic tools.
|
|
146
|
+
|
|
147
|
+
## Documentation
|
|
148
|
+
|
|
149
|
+
- [docs/architecture.md](docs/architecture.md) — pipeline layout, models, determinism contract
|
|
150
|
+
- [docs/cli.md](docs/cli.md) — every command, option, and exit code
|
|
151
|
+
- [docs/output-formats.md](docs/output-formats.md) — console/JSON/JSONL/SARIF/agent + CI gate
|
|
152
|
+
- [docs/checks.md](docs/checks.md) — finding model, namespaces, confidence semantics
|
|
153
|
+
- [docs/compatibility.md](docs/compatibility.md) — cross-protocol diff taxonomy, decision tables, client-impact coverage
|
|
154
|
+
- [docs/runtime-evidence.md](docs/runtime-evidence.md) — trace/log ingestion, history, perf & SLOs
|
|
155
|
+
- [docs/runtime-scale.md](docs/runtime-scale.md) — streaming bounds, memory curve, perf budget gate, snapshot formats
|
|
156
|
+
- [docs/policies.md](docs/policies.md) — policy files, inheritance, exceptions, ownership
|
|
157
|
+
- [docs/workspace-fleet.md](docs/workspace-fleet.md) — multi-repo manifests + inventory
|
|
158
|
+
- [docs/knowledge-packs.md](docs/knowledge-packs.md) — versioned knowledge data + plugin SDK
|
|
159
|
+
- [docs/migration.md](docs/migration.md) — portability assessments + decision briefs
|
|
160
|
+
- [docs/handoff.md](docs/handoff.md) — `ApiHandoffBundle`, `DoctorApi`, Forger routing
|
|
161
|
+
- [docs/infrastructure.md](docs/infrastructure.md) — gateway/mesh declared config + Kubernetes/IaC evidence
|
|
162
|
+
- [docs/cache.md](docs/cache.md) — declared cache policies, layers, invalidation risk
|
|
163
|
+
- [docs/lab.md](docs/lab.md) — Forge Lab corpus, ground truth, precision/recall
|
|
164
|
+
- [docs/output-contract.md](docs/output-contract.md) — v1 export schemas (json/jsonl/sarif/agent/report) + evolution rules
|
|
165
|
+
- [docs/forger-boundary.md](docs/forger-boundary.md) — Doctor ↔ API Forge ↔ The Forger typed boundary
|
|
166
|
+
- [docs/release-policy.md](docs/release-policy.md) — versioning, public surfaces, release checklist, SBOM
|
|
167
|
+
- [docs/release-v0.1.md](docs/release-v0.1.md) — quality gate, packaging, hermetic proofs
|
|
168
|
+
- [docs/roadmap.md](docs/roadmap.md) — shipped coverage vs planned waves
|
|
169
|
+
- [docs/adr/](docs/adr/) — architecture decision records
|
|
170
|
+
- [docs/development.md](docs/development.md) — repo layout, test/lint/typecheck, adding a check
|
|
171
|
+
|
|
172
|
+
## Repository layout
|
|
173
|
+
|
|
174
|
+
```text
|
|
175
|
+
src/forge_doctor_api/ engine (analyzers, checks, models, CLI)
|
|
176
|
+
tests/ pytest suite (offline-blocked sockets)
|
|
177
|
+
labs/ Forge Lab corpus: golden + adversarial fixtures
|
|
178
|
+
factory/ Loop Factory specs, run records, quality gate
|
|
179
|
+
.github/workflows/ doctor-scan.yml CI gate
|
|
180
|
+
docs/ documentation
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Graph Studio
|
|
184
|
+
|
|
185
|
+
`forge-doctor-api graph . --view|--ui` projects the service graph through
|
|
186
|
+
`forge/ForgeGraphView/v1` and serves the embedded local explorer (declinable at
|
|
187
|
+
install via `--components`). Full docs: `the-forge/docs/graph-studio/`.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "forge-doctor-api"
|
|
3
|
+
version = "0.2.0"
|
|
4
|
+
description = "Deterministic, offline-first, evidence-first API architecture intelligence engine."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.11"
|
|
7
|
+
authors = [{ name = "Edgar Sócrates Caria" }]
|
|
8
|
+
license = { text = "MIT" }
|
|
9
|
+
classifiers = [
|
|
10
|
+
"Programming Language :: Python :: 3.11",
|
|
11
|
+
"Programming Language :: Python :: 3.12",
|
|
12
|
+
"Programming Language :: Python :: 3.13",
|
|
13
|
+
"Operating System :: OS Independent",
|
|
14
|
+
]
|
|
15
|
+
dependencies = [
|
|
16
|
+
"typer>=0.12",
|
|
17
|
+
"rich>=15.0.0",
|
|
18
|
+
"pyyaml>=6.0",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[project.optional-dependencies]
|
|
22
|
+
graphql = ["graphql-core>=3.2,<4"]
|
|
23
|
+
mcp = ["mcp>=2.0,<3"]
|
|
24
|
+
|
|
25
|
+
[project.scripts]
|
|
26
|
+
forge-doctor-api = "forge_doctor_api.cli:main"
|
|
27
|
+
|
|
28
|
+
[tool.poetry]
|
|
29
|
+
packages = [{ include = "forge_doctor_api", from = "src" }]
|
|
30
|
+
|
|
31
|
+
[tool.poetry.group.dev.dependencies]
|
|
32
|
+
pytest = ">=8.0"
|
|
33
|
+
ruff = ">=0.6"
|
|
34
|
+
mypy = ">=2.3.1"
|
|
35
|
+
types-PyYAML = ">=6.0"
|
|
36
|
+
|
|
37
|
+
[build-system]
|
|
38
|
+
requires = ["poetry-core>=2.0"]
|
|
39
|
+
build-backend = "poetry.core.masonry.api"
|
|
40
|
+
|
|
41
|
+
[tool.pytest.ini_options]
|
|
42
|
+
testpaths = ["tests"]
|
|
43
|
+
pythonpath = ["src"]
|
|
44
|
+
addopts = "-ra --basetemp=.pytest-tmp"
|
|
45
|
+
|
|
46
|
+
[tool.ruff]
|
|
47
|
+
line-length = 100
|
|
48
|
+
target-version = "py311"
|
|
49
|
+
src = ["src", "tests"]
|
|
50
|
+
extend-exclude = ["factory", "docs", ".claude", "labs"]
|
|
51
|
+
|
|
52
|
+
[tool.ruff.lint]
|
|
53
|
+
select = ["E", "F", "W", "I", "B", "UP", "SIM", "RUF", "DTZ"]
|
|
54
|
+
|
|
55
|
+
[tool.ruff.lint.per-file-ignores]
|
|
56
|
+
# Vendored Graph Studio kit (canonical: the-forge/src/theforge)
|
|
57
|
+
"src/forge_doctor_api/_graphview.py" = ["ALL"]
|
|
58
|
+
"src/forge_doctor_api/_graphstudio.py" = ["ALL"]
|
|
59
|
+
# Vendored Forge UI kit (canonical: the-forge/src/theforge/ui)
|
|
60
|
+
"src/forge_doctor_api/ui/**/*.py" = ["ALL"]
|
|
61
|
+
# Vendored shared sources — canonical copies in the-forge are the lint target.
|
|
62
|
+
"scripts/forge_installkit.py" = ["ALL"]
|
|
63
|
+
"scripts/forge_bootstrap.py" = ["ALL"]
|
|
64
|
+
# Vendored portal server — canonical copy in forge-portal/portal_core.
|
|
65
|
+
"scripts/_forge_portal.py" = ["ALL"]
|
|
66
|
+
|
|
67
|
+
[tool.mypy]
|
|
68
|
+
python_version = "3.11"
|
|
69
|
+
strict = true
|
|
70
|
+
mypy_path = "src"
|
|
71
|
+
packages = ["forge_doctor_api"]
|
|
72
|
+
|
|
73
|
+
[[tool.mypy.overrides]]
|
|
74
|
+
# Optional extras are absent under a minimal install — mypy must still
|
|
75
|
+
# pass there (TYPE_CHECKING imports resolve as missing by design).
|
|
76
|
+
module = ["mcp", "mcp.*", "graphql", "graphql.*"]
|
|
77
|
+
follow_imports = "skip"
|
|
78
|
+
ignore_missing_imports = true
|
|
79
|
+
|
|
80
|
+
[[tool.mypy.overrides]]
|
|
81
|
+
module = ["forge_doctor_api.handoff.mcp_server"]
|
|
82
|
+
disallow_untyped_decorators = false
|
|
83
|
+
|
|
84
|
+
[[tool.mypy.overrides]]
|
|
85
|
+
# Vendored upstream surfaces (byte-parity with the-forge, same convention
|
|
86
|
+
# as api-forge's `_installkit`/`tui.*`): canonical copy is the typecheck
|
|
87
|
+
# target; kept byte-identical here outside `strict`.
|
|
88
|
+
module = [
|
|
89
|
+
"forge_doctor_api._graphview",
|
|
90
|
+
"forge_doctor_api._graphstudio",
|
|
91
|
+
"forge_doctor_api.ui.*",
|
|
92
|
+
]
|
|
93
|
+
ignore_errors = true
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""Forge Doctor API: deterministic API architecture intelligence.
|
|
2
|
+
|
|
3
|
+
Public surface (stable): `Doctor` facade, `DoctorReport`, core models
|
|
4
|
+
and the handoff bundle. Everything else is internal and may move —
|
|
5
|
+
import from here, not from deep module paths.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from forge_doctor_api.core.context import ProjectContext
|
|
9
|
+
from forge_doctor_api.core.discovery import ArtifactInventory
|
|
10
|
+
from forge_doctor_api.core.models import (
|
|
11
|
+
Confidence,
|
|
12
|
+
Evidence,
|
|
13
|
+
EvidenceKind,
|
|
14
|
+
Finding,
|
|
15
|
+
Model,
|
|
16
|
+
Severity,
|
|
17
|
+
SourceLocation,
|
|
18
|
+
UnknownFact,
|
|
19
|
+
)
|
|
20
|
+
from forge_doctor_api.core.plan import AnalysisPlan
|
|
21
|
+
from forge_doctor_api.core.report import DomainSummary
|
|
22
|
+
from forge_doctor_api.handoff.bundle import assemble_bundle
|
|
23
|
+
from forge_doctor_api.handoff.model import ApiHandoffBundle
|
|
24
|
+
from forge_doctor_api.handoff.protocol import (
|
|
25
|
+
ForgeHandoff,
|
|
26
|
+
ForgeReceipt,
|
|
27
|
+
ForgeRef,
|
|
28
|
+
ForgeRequest,
|
|
29
|
+
ForgeResult,
|
|
30
|
+
)
|
|
31
|
+
from forge_doctor_api.report import DoctorReport
|
|
32
|
+
from forge_doctor_api.sdk import (
|
|
33
|
+
SDK_VERSION,
|
|
34
|
+
Doctor,
|
|
35
|
+
DoctorError,
|
|
36
|
+
FindingNotFoundError,
|
|
37
|
+
ProjectUnreadableError,
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
__version__ = "0.2.0"
|
|
41
|
+
|
|
42
|
+
__all__ = [
|
|
43
|
+
"SDK_VERSION",
|
|
44
|
+
"AnalysisPlan",
|
|
45
|
+
"ApiHandoffBundle",
|
|
46
|
+
"ArtifactInventory",
|
|
47
|
+
"Confidence",
|
|
48
|
+
"Doctor",
|
|
49
|
+
"DoctorError",
|
|
50
|
+
"DoctorReport",
|
|
51
|
+
"DomainSummary",
|
|
52
|
+
"Evidence",
|
|
53
|
+
"EvidenceKind",
|
|
54
|
+
"Finding",
|
|
55
|
+
"FindingNotFoundError",
|
|
56
|
+
"ForgeHandoff",
|
|
57
|
+
"ForgeReceipt",
|
|
58
|
+
"ForgeRef",
|
|
59
|
+
"ForgeRequest",
|
|
60
|
+
"ForgeResult",
|
|
61
|
+
"Model",
|
|
62
|
+
"ProjectContext",
|
|
63
|
+
"ProjectUnreadableError",
|
|
64
|
+
"Severity",
|
|
65
|
+
"SourceLocation",
|
|
66
|
+
"UnknownFact",
|
|
67
|
+
"__version__",
|
|
68
|
+
"assemble_bundle",
|
|
69
|
+
]
|