codegraph-engine 2.3.0__py3-none-any.whl → 3.0.1__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.
- codegraph/__init__.py +1 -1
- codegraph/__main__.py +7 -0
- codegraph/agent_brain.py +253 -2
- codegraph/agent_capabilities.py +1348 -67
- codegraph/agent_rules.py +2 -1
- codegraph/api_drift.py +455 -0
- codegraph/architecture_rules.py +123 -0
- codegraph/async_queue/__init__.py +50 -0
- codegraph/async_queue/detectors/__init__.py +48 -0
- codegraph/async_queue/detectors/celery.py +160 -0
- codegraph/async_queue/detectors/kafka.py +168 -0
- codegraph/async_queue/detectors/rabbitmq.py +116 -0
- codegraph/async_queue/detectors/redis.py +130 -0
- codegraph/async_queue/detectors/sqs.py +135 -0
- codegraph/async_queue/models.py +161 -0
- codegraph/async_queue/otel_models.py +74 -0
- codegraph/async_queue/otel_parser.py +337 -0
- codegraph/async_queue/reconciler.py +427 -0
- codegraph/async_queue/scanner.py +291 -0
- codegraph/async_queue/traversal.py +447 -0
- codegraph/change_impact.py +320 -110
- codegraph/changelog.py +170 -0
- codegraph/cli.py +1605 -62
- codegraph/cli_output.py +17 -2
- codegraph/context.py +135 -24
- codegraph/context_freshness.py +2 -0
- codegraph/database/__init__.py +14 -0
- codegraph/database/extractor.py +712 -17
- codegraph/database/interrogation.py +388 -2
- codegraph/database/schema_drift.py +862 -0
- codegraph/dataflow_propagation.py +118 -0
- codegraph/dead_code.py +387 -0
- codegraph/epistemic.py +15 -0
- codegraph/evidence_contract.py +34 -3
- codegraph/federation.py +245 -0
- codegraph/frameworks.py +234 -12
- codegraph/frameworks_nestjs.py +502 -0
- codegraph/frameworks_nextjs.py +337 -0
- codegraph/frameworks_react.py +457 -0
- codegraph/freshness.py +2 -0
- codegraph/frontend_html.py +109 -0
- codegraph/git.py +2 -0
- codegraph/git_state.py +2 -0
- codegraph/graph/traversal.py +150 -7
- codegraph/graph_csr.py +218 -0
- codegraph/incremental.py +150 -0
- codegraph/indexing/__init__.py +7 -1
- codegraph/indexing/classifier.py +5 -0
- codegraph/indexing/indexer.py +292 -38
- codegraph/indexing/languages/__init__.py +1 -0
- codegraph/indexing/languages/cpp.py +457 -0
- codegraph/indexing/languages/go.py +459 -0
- codegraph/indexing/languages/jvm.py +583 -0
- codegraph/indexing/languages/rust.py +507 -0
- codegraph/indexing/models.py +15 -1
- codegraph/indexing/parser.py +385 -9
- codegraph/indexing/pool.py +136 -0
- codegraph/indexing/protocols.py +220 -0
- codegraph/indexing/scanner.py +23 -0
- codegraph/indexing/templates.py +418 -0
- codegraph/interrogation.py +207 -39
- codegraph/lsp.py +318 -0
- codegraph/lsp_bridge/__init__.py +16 -0
- codegraph/lsp_bridge/bridge.py +102 -0
- codegraph/lsp_bridge/client.py +207 -0
- codegraph/lsp_bridge/models.py +71 -0
- codegraph/mcp/server.py +502 -29
- codegraph/memory/trajectory.py +282 -0
- codegraph/models.py +7 -0
- codegraph/monorepo.py +3 -0
- codegraph/multi_agent/__init__.py +13 -0
- codegraph/multi_agent/coordinator.py +229 -0
- codegraph/multi_agent/models.py +76 -0
- codegraph/optimizer.py +42 -5
- codegraph/polymorphism.py +95 -0
- codegraph/pr_review.py +296 -0
- codegraph/process_lifecycle.py +50 -12
- codegraph/reachability.py +198 -0
- codegraph/reachability_index.py +74 -0
- codegraph/refactor/__init__.py +48 -0
- codegraph/refactor/models.py +114 -0
- codegraph/refactor/patcher.py +348 -0
- codegraph/refactor/renamer.py +844 -0
- codegraph/refactor/transactions.py +414 -0
- codegraph/repair.py +233 -0
- codegraph/resolver.py +1357 -161
- codegraph/retrieval_policy.py +22 -1
- codegraph/roblox.py +2174 -0
- codegraph/route_composer.py +7 -0
- codegraph/route_topology.py +172 -0
- codegraph/runtime/__init__.py +25 -0
- codegraph/runtime/collector.py +155 -0
- codegraph/runtime/db_watcher.py +191 -0
- codegraph/runtime/ingestor.py +30 -10
- codegraph/runtime/otel_receiver.py +208 -0
- codegraph/runtime/port_inspector.py +304 -0
- codegraph/runtime/runner.py +155 -6
- codegraph/runtime/trace_linker.py +175 -0
- codegraph/sandbox.py +215 -0
- codegraph/search/hybrid.py +26 -0
- codegraph/security/supply_chain.py +188 -0
- codegraph/security/taint.py +421 -0
- codegraph/semantic_decorators.py +34 -3
- codegraph/structural_diff.py +2 -0
- codegraph/styles.py +144 -0
- codegraph/symbol_history.py +2 -0
- codegraph/test_gen.py +437 -0
- codegraph/tsconfig.py +236 -0
- codegraph/ui/__init__.py +6 -0
- codegraph/ui/server.py +876 -0
- codegraph/watcher.py +323 -0
- {codegraph_engine-2.3.0.dist-info → codegraph_engine-3.0.1.dist-info}/METADATA +365 -67
- codegraph_engine-3.0.1.dist-info/RECORD +164 -0
- {codegraph_engine-2.3.0.dist-info → codegraph_engine-3.0.1.dist-info}/WHEEL +1 -1
- codegraph_engine-2.3.0.dist-info/RECORD +0 -94
- {codegraph_engine-2.3.0.dist-info → codegraph_engine-3.0.1.dist-info}/entry_points.txt +0 -0
- {codegraph_engine-2.3.0.dist-info → codegraph_engine-3.0.1.dist-info}/licenses/LICENSE +0 -0
- {codegraph_engine-2.3.0.dist-info → codegraph_engine-3.0.1.dist-info}/top_level.txt +0 -0
codegraph/__init__.py
CHANGED
codegraph/__main__.py
ADDED
codegraph/agent_brain.py
CHANGED
|
@@ -644,6 +644,256 @@ RELATIONSHIP_SEMANTICS_REGISTRY: dict[str, RelationshipSemanticsSpec] = {
|
|
|
644
644
|
common_tool="get_db_schema / get_context",
|
|
645
645
|
example="`src/config.py` -> `READS_ENV` (`AST_VERIFIED`) -> `env:DATABASE_URL`",
|
|
646
646
|
),
|
|
647
|
+
"RENDERS": RelationshipSemanticsSpec(
|
|
648
|
+
relationship="RENDERS",
|
|
649
|
+
meaning="React JSX component renders a child component element (`<ChildComponent ... />`).",
|
|
650
|
+
typical_source="Parent component symbol (`DashboardPage`, `InvoiceTable`)",
|
|
651
|
+
typical_target="Child component symbol (`InvoiceCard`, `Button`)",
|
|
652
|
+
proves="Static JSX component composition tree hierarchy.",
|
|
653
|
+
does_not_prove="Does not prove conditional branch execution at runtime unless inspected.",
|
|
654
|
+
common_tool="find_callers / find_callees / get_references",
|
|
655
|
+
example="`Dashboard` -> `RENDERS` (`AST_VERIFIED`) -> `InvoiceTable`",
|
|
656
|
+
),
|
|
657
|
+
"USES_HOOK": RelationshipSemanticsSpec(
|
|
658
|
+
relationship="USES_HOOK",
|
|
659
|
+
meaning="React component or custom hook calls a state/lifecycle hook (`useAuth()`, `useInvoices()`).",
|
|
660
|
+
typical_source="Component or custom hook (`UserProfile`, `useOrderDetails`)",
|
|
661
|
+
typical_target="Hook function symbol (`useAuth`, `useQuery`)",
|
|
662
|
+
proves="Component or custom hook lifecycle dependency on target hook.",
|
|
663
|
+
does_not_prove="Does not prove hook return value shape without inspecting hook definition.",
|
|
664
|
+
common_tool="find_callers / get_references / trace_path",
|
|
665
|
+
example="`UserProfile` -> `USES_HOOK` (`FRAMEWORK_VERIFIED`) -> `useAuth`",
|
|
666
|
+
),
|
|
667
|
+
"IMPORTS_STYLE": RelationshipSemanticsSpec(
|
|
668
|
+
relationship="IMPORTS_STYLE",
|
|
669
|
+
meaning="Component or module imports a CSS/SCSS stylesheet or CSS module (`import styles from './Button.module.css'`).",
|
|
670
|
+
typical_source="Component or page file (`Button.tsx`)",
|
|
671
|
+
typical_target="Stylesheet file (`Button.module.css`, `globals.css`)",
|
|
672
|
+
proves="Component imports style definitions from target stylesheet.",
|
|
673
|
+
does_not_prove="Does not prove all style classes in the file are actively applied.",
|
|
674
|
+
common_tool="find_references / get_file / get_context",
|
|
675
|
+
example="`Button.tsx` -> `IMPORTS_STYLE` (`AST_VERIFIED`) -> `Button.module.css`",
|
|
676
|
+
),
|
|
677
|
+
"USES_STYLE_CLASS": RelationshipSemanticsSpec(
|
|
678
|
+
relationship="USES_STYLE_CLASS",
|
|
679
|
+
meaning="JSX element or component references a CSS class selector (`className={styles.header}` or `className='btn-primary'`).",
|
|
680
|
+
typical_source="Component or JSX element (`Header.tsx`)",
|
|
681
|
+
typical_target="CSS class symbol (`.header-title`, `.btn-primary`)",
|
|
682
|
+
proves="Component applies the named CSS style class.",
|
|
683
|
+
does_not_prove="Does not prove CSS specificity or cascade overrides.",
|
|
684
|
+
common_tool="find_references / search_code / get_context",
|
|
685
|
+
example="`Header.tsx` -> `USES_STYLE_CLASS` (`FRAMEWORK_VERIFIED`) -> `.header-title`",
|
|
686
|
+
),
|
|
687
|
+
"FETCHES_ROUTE": RelationshipSemanticsSpec(
|
|
688
|
+
relationship="FETCHES_ROUTE",
|
|
689
|
+
meaning="Frontend component, hook, or API client invokes a backend HTTP route (`fetch('/api/v1/invoices')`, `axios.get(...)`).",
|
|
690
|
+
typical_source="Frontend component or data hook (`useInvoices`, `createInvoiceForm`)",
|
|
691
|
+
typical_target="Backend route endpoint (`POST /api/v1/invoices`, `GET /api/v1/users`)",
|
|
692
|
+
proves="Frontend client-side network request targeting a backend route.",
|
|
693
|
+
does_not_prove="Does not prove backend server availability at runtime.",
|
|
694
|
+
common_tool="find_callers / trace_path / list_routes",
|
|
695
|
+
example="`useInvoices` -> `FETCHES_ROUTE` (`FRAMEWORK_VERIFIED`) -> `GET /api/v1/invoices`",
|
|
696
|
+
),
|
|
697
|
+
"LOADS_SCRIPT": RelationshipSemanticsSpec(
|
|
698
|
+
relationship="LOADS_SCRIPT",
|
|
699
|
+
meaning="HTML template or page loads a JavaScript/TypeScript script bundle (`<script src='...'>`).",
|
|
700
|
+
typical_source="HTML file (`index.html`)",
|
|
701
|
+
typical_target="Script file (`src/main.tsx`, `bundle.js`)",
|
|
702
|
+
proves="HTML document includes and executes target script.",
|
|
703
|
+
does_not_prove="Does not prove script execution order if async/defer are used.",
|
|
704
|
+
common_tool="find_references / get_file",
|
|
705
|
+
example="`index.html` -> `LOADS_SCRIPT` (`STATIC_VERIFIED`) -> `src/main.tsx`",
|
|
706
|
+
),
|
|
707
|
+
"LOADS_STYLESHEET": RelationshipSemanticsSpec(
|
|
708
|
+
relationship="LOADS_STYLESHEET",
|
|
709
|
+
meaning="HTML template or page loads an external stylesheet (`<link rel='stylesheet' href='...'>`).",
|
|
710
|
+
typical_source="HTML file (`index.html`)",
|
|
711
|
+
typical_target="Stylesheet file (`src/index.css`, `theme.css`)",
|
|
712
|
+
proves="HTML document links target stylesheet for presentation.",
|
|
713
|
+
does_not_prove="Does not prove runtime CDN stylesheet availability.",
|
|
714
|
+
common_tool="find_references / get_file",
|
|
715
|
+
example="`index.html` -> `LOADS_STYLESHEET` (`STATIC_VERIFIED`) -> `src/index.css`",
|
|
716
|
+
),
|
|
717
|
+
"MAPS_TO_COLLECTION": RelationshipSemanticsSpec(
|
|
718
|
+
relationship="MAPS_TO_COLLECTION",
|
|
719
|
+
meaning="NoSQL document model (Mongoose model) maps to an underlying MongoDB collection.",
|
|
720
|
+
typical_source="Mongoose model (`InvoiceModel`)",
|
|
721
|
+
typical_target="MongoDB collection (`invoices`)",
|
|
722
|
+
proves="Static mapping between document model and database collection.",
|
|
723
|
+
does_not_prove="Does not prove database schema strictness unless validation options are inspected.",
|
|
724
|
+
common_tool="find_db_tables / find_db_models / get_db_table",
|
|
725
|
+
example="`InvoiceModel` -> `MAPS_TO_COLLECTION` (`FRAMEWORK_VERIFIED`) -> `db.UNKNOWN.UNKNOWN.invoices`",
|
|
726
|
+
),
|
|
727
|
+
"WRITES_COLLECTION": RelationshipSemanticsSpec(
|
|
728
|
+
relationship="WRITES_COLLECTION",
|
|
729
|
+
meaning="Function or route writes (insert, update, delete) documents to a MongoDB collection.",
|
|
730
|
+
typical_source="Caller symbol or API handler (`createInvoice`)",
|
|
731
|
+
typical_target="MongoDB collection (`invoices`)",
|
|
732
|
+
proves="Write operation (`Model.create`, `Model.updateOne`, `insertOne`) against target collection.",
|
|
733
|
+
does_not_prove="Does not prove transaction commit or replica-set write concern acknowledgment.",
|
|
734
|
+
common_tool="find_db_writers / get_context / trace_path",
|
|
735
|
+
example="`createInvoice` -> `WRITES_COLLECTION` (`AST_VERIFIED`) -> `db.UNKNOWN.UNKNOWN.invoices`",
|
|
736
|
+
),
|
|
737
|
+
"READS_COLLECTION": RelationshipSemanticsSpec(
|
|
738
|
+
relationship="READS_COLLECTION",
|
|
739
|
+
meaning="Function or route reads (find, aggregate, count) documents from a MongoDB collection.",
|
|
740
|
+
typical_source="Caller symbol or API handler (`listInvoices`)",
|
|
741
|
+
typical_target="MongoDB collection (`invoices`)",
|
|
742
|
+
proves="Read query (`Model.find`, `Model.findOne`, `aggregate`) against target collection.",
|
|
743
|
+
does_not_prove="Does not prove document existence at runtime.",
|
|
744
|
+
common_tool="find_db_readers / get_context / trace_path",
|
|
745
|
+
example="`listInvoices` -> `READS_COLLECTION` (`AST_VERIFIED`) -> `db.UNKNOWN.UNKNOWN.invoices`",
|
|
746
|
+
),
|
|
747
|
+
"DISPATCHES_TASK": RelationshipSemanticsSpec(
|
|
748
|
+
relationship="DISPATCHES_TASK",
|
|
749
|
+
meaning="Caller function or route dispatches a background task (.delay(), .apply_async(), .send_task()).",
|
|
750
|
+
typical_source="Caller symbol or API handler (`checkout_order`, `register_user`)",
|
|
751
|
+
typical_target="Task handler function (`process_order_payment`, `send_welcome_email`)",
|
|
752
|
+
proves="Background task invocation connects caller to the queued task handler.",
|
|
753
|
+
does_not_prove="Does not prove queue worker status or job execution timing.",
|
|
754
|
+
common_tool="trace_path / find_callees / get_context",
|
|
755
|
+
example="`checkout_order` -> `DISPATCHES_TASK` (`FRAMEWORK_VERIFIED`) -> `process_order_payment`",
|
|
756
|
+
),
|
|
757
|
+
"TRIGGERS_SIGNAL": RelationshipSemanticsSpec(
|
|
758
|
+
relationship="TRIGGERS_SIGNAL",
|
|
759
|
+
meaning="Model lifecycle action (save, delete) or signal emission triggers a signal receiver.",
|
|
760
|
+
typical_source="Model or lifecycle method (`Customer.save`, `signal.send`)",
|
|
761
|
+
typical_target="Signal receiver function (`on_customer_created`)",
|
|
762
|
+
proves="Django signal linkage connects the model or trigger site to registered receivers.",
|
|
763
|
+
does_not_prove="Does not prove transaction commit before receiver execution.",
|
|
764
|
+
common_tool="trace_path / find_callees / get_context",
|
|
765
|
+
example="`Customer.save` -> `TRIGGERS_SIGNAL` (`FRAMEWORK_VERIFIED`) -> `on_customer_created`",
|
|
766
|
+
),
|
|
767
|
+
"HANDLES_SIGNAL": RelationshipSemanticsSpec(
|
|
768
|
+
relationship="HANDLES_SIGNAL",
|
|
769
|
+
meaning="Signal receiver function handles lifecycle events or domain signals from a sender model.",
|
|
770
|
+
typical_source="Receiver function (`on_customer_created`)",
|
|
771
|
+
typical_target="Sender model symbol (`Customer`)",
|
|
772
|
+
proves="Receiver function is bound to the sender model via @receiver or signal.connect.",
|
|
773
|
+
does_not_prove="Does not prove receiver handles all signal kwargs.",
|
|
774
|
+
common_tool="find_callers / get_references / get_context",
|
|
775
|
+
example="`on_customer_created` -> `HANDLES_SIGNAL` (`FRAMEWORK_VERIFIED`) -> `Customer`",
|
|
776
|
+
),
|
|
777
|
+
"RENDERS_TEMPLATE": RelationshipSemanticsSpec(
|
|
778
|
+
relationship="RENDERS_TEMPLATE",
|
|
779
|
+
meaning="View or controller renders an HTML or Jinja template (render_template, TemplateResponse, template_name).",
|
|
780
|
+
typical_source="View handler symbol (`dashboard_view`)",
|
|
781
|
+
typical_target="Template file path (`templates/dashboard.html`)",
|
|
782
|
+
proves="Deterministic linkage between backend view function and frontend HTML template.",
|
|
783
|
+
does_not_prove="Does not prove all template context variables are provided.",
|
|
784
|
+
common_tool="list_routes / get_context / find_callees",
|
|
785
|
+
example="`dashboard_view` -> `RENDERS_TEMPLATE` (`FRAMEWORK_VERIFIED`) -> `templates/dashboard.html`",
|
|
786
|
+
),
|
|
787
|
+
"DISPATCHES_FORWARD": RelationshipSemanticsSpec(
|
|
788
|
+
relationship="DISPATCHES_FORWARD",
|
|
789
|
+
meaning="Neural network module invocation (model(inputs), self.submodule(x)) dispatches to nn.Module.forward().",
|
|
790
|
+
typical_source="Caller function or model forward pass (`predict`, `Classifier.forward`)",
|
|
791
|
+
typical_target="Submodule or model forward method (`Encoder.forward`, `Linear.forward`)",
|
|
792
|
+
proves="PyTorch __call__ dispatch to forward method on a concrete or resolved module instance.",
|
|
793
|
+
does_not_prove="Does not prove runtime execution if forward hooks or dynamic wrappers abort execution.",
|
|
794
|
+
common_tool="trace_path / find_callees / get_context",
|
|
795
|
+
example="`predict` -> `DISPATCHES_FORWARD` (`AST_VERIFIED`) -> `Classifier.forward`",
|
|
796
|
+
),
|
|
797
|
+
"TOOL_HANDLER": RelationshipSemanticsSpec(
|
|
798
|
+
relationship="TOOL_HANDLER",
|
|
799
|
+
meaning="Function or method is decorated as an agentic AI tool (@tool, @function_tool, @agent).",
|
|
800
|
+
typical_source="Tool function (`search_web_tool`, `execute_sql`)",
|
|
801
|
+
typical_target="Agent framework registration decorator (`@tool`)",
|
|
802
|
+
proves="Function is registered as a callable tool in an agentic workflow.",
|
|
803
|
+
does_not_prove="Does not prove tool argument schema compatibility with LLM runtime.",
|
|
804
|
+
common_tool="find_references / get_symbol / get_context",
|
|
805
|
+
example="`search_web_tool` -> `TOOL_HANDLER` (`FRAMEWORK_VERIFIED`) -> `@tool`",
|
|
806
|
+
),
|
|
807
|
+
"PIPELINE_STEP": RelationshipSemanticsSpec(
|
|
808
|
+
relationship="PIPELINE_STEP",
|
|
809
|
+
meaning="Sequential execution link in an AI/ML pipeline or LangChain LCEL chain (prompt | llm | parser).",
|
|
810
|
+
typical_source="Upstream pipeline component or prompt template (`prompt_template`)",
|
|
811
|
+
typical_target="Downstream pipeline component or model runner (`chat_model`)",
|
|
812
|
+
proves="Dataflow pipe composition between execution steps in an AI/ML workflow.",
|
|
813
|
+
does_not_prove="Does not prove runtime type convergence between pipe boundaries.",
|
|
814
|
+
common_tool="trace_path / find_callees / get_context",
|
|
815
|
+
example="`prompt_template` -> `PIPELINE_STEP` (`DATAFLOW_VERIFIED`) -> `chat_model`",
|
|
816
|
+
),
|
|
817
|
+
"REQUIRES_MODULE": RelationshipSemanticsSpec(
|
|
818
|
+
relationship="REQUIRES_MODULE",
|
|
819
|
+
meaning="Luau or Roblox module requires another ModuleScript via `require(...)` using Rojo DataModel paths or `script.Parent` traversal.",
|
|
820
|
+
typical_source="Caller Luau module or function (`ClientController`, `InventoryService`)",
|
|
821
|
+
typical_target="Target ModuleScript (`Packages.Knit`, `src.shared.Types`)",
|
|
822
|
+
proves="Deterministic module dependency via Rojo project mapping (`ROJO_VERIFIED`) or bounded relative script path (`AST_VERIFIED`).",
|
|
823
|
+
does_not_prove="Does not prove runtime execution order when `require` is inside a conditional branch.",
|
|
824
|
+
common_tool="get_imports / trace_path / get_context",
|
|
825
|
+
example="`InventoryService` -> `REQUIRES_MODULE` (`ROJO_VERIFIED`) -> `Packages.Knit`",
|
|
826
|
+
),
|
|
827
|
+
"CLIENT_DISPATCHES_REMOTE": RelationshipSemanticsSpec(
|
|
828
|
+
relationship="CLIENT_DISPATCHES_REMOTE",
|
|
829
|
+
meaning="Roblox client script or controller dispatches a `RemoteEvent:FireServer(...)` or `RemoteFunction:InvokeServer(...)` call across the client-server boundary.",
|
|
830
|
+
typical_source="Client controller or LocalScript (`ClientController.RequestInventoryUpdate`)",
|
|
831
|
+
typical_target="Canonical Roblox Remote node (`ReplicatedStorage.Remotes.Inventory`)",
|
|
832
|
+
proves="Client-to-server network dispatch targeting the resolved Remote instance (`ROJO_VERIFIED` or `FRAMEWORK_VERIFIED`).",
|
|
833
|
+
does_not_prove="Never collapsed into generic `CALLS`; does not prove server validation success at runtime.",
|
|
834
|
+
common_tool="trace_path / find_callees / get_context",
|
|
835
|
+
example="`ClientController` -> `CLIENT_DISPATCHES_REMOTE` (`ROJO_VERIFIED`) -> `ReplicatedStorage.Remotes.Inventory`",
|
|
836
|
+
),
|
|
837
|
+
"SERVER_HANDLES_REMOTE": RelationshipSemanticsSpec(
|
|
838
|
+
relationship="SERVER_HANDLES_REMOTE",
|
|
839
|
+
meaning="Roblox server script or service connects a handler to `RemoteEvent.OnServerEvent:Connect(...)` or assigns `RemoteFunction.OnServerInvoke`.",
|
|
840
|
+
typical_source="Canonical Roblox Remote node (`ReplicatedStorage.Remotes.Inventory`)",
|
|
841
|
+
typical_target="Server service or handler method (`InventoryService.KnitInit`, `InventoryService`)",
|
|
842
|
+
proves="Server-side network handler registration for the canonical Remote channel (`ROJO_VERIFIED` or `FRAMEWORK_VERIFIED`).",
|
|
843
|
+
does_not_prove="Never collapsed into generic `CALLS`; does not prove payload schema validation.",
|
|
844
|
+
common_tool="trace_path / find_callers / get_context",
|
|
845
|
+
example="`ReplicatedStorage.Remotes.Inventory` -> `SERVER_HANDLES_REMOTE` (`ROJO_VERIFIED`) -> `InventoryService`",
|
|
846
|
+
),
|
|
847
|
+
"PROVIDES_SERVICE": RelationshipSemanticsSpec(
|
|
848
|
+
relationship="PROVIDES_SERVICE",
|
|
849
|
+
meaning="Knit (`Knit.CreateService`) or Flamework (`@Service`, `@Controller`) declares a named singleton service or controller.",
|
|
850
|
+
typical_source="Service class or table symbol (`src.server.Services.InventoryService.InventoryService`)",
|
|
851
|
+
typical_target="Registered service identifier (`InventoryService`, `CombatService`)",
|
|
852
|
+
proves="Framework service provider registration (`FRAMEWORK_VERIFIED`).",
|
|
853
|
+
does_not_prove="Does not prove `Knit.Start()` has completed at runtime.",
|
|
854
|
+
common_tool="trace_path / find_references / get_context",
|
|
855
|
+
example="`InventoryService` -> `PROVIDES_SERVICE` (`FRAMEWORK_VERIFIED`) -> `InventoryService`",
|
|
856
|
+
),
|
|
857
|
+
"GETS_SERVICE": RelationshipSemanticsSpec(
|
|
858
|
+
relationship="GETS_SERVICE",
|
|
859
|
+
meaning="Knit (`Knit.GetService(...)`) or Flamework (`Dependency<T>()`) resolves a framework service or controller dependency.",
|
|
860
|
+
typical_source="Consumer controller or service method (`RewardService.GrantStarterPack`, `CombatController`)",
|
|
861
|
+
typical_target="Target service symbol (`src.server.Services.InventoryService.InventoryService`)",
|
|
862
|
+
proves="Framework dependency resolution linking consumer to service provider (`FRAMEWORK_VERIFIED`).",
|
|
863
|
+
does_not_prove="Does not prove runtime initialization order.",
|
|
864
|
+
common_tool="trace_path / find_callees / analyze_impact",
|
|
865
|
+
example="`RewardService.GrantStarterPack` -> `GETS_SERVICE` (`FRAMEWORK_VERIFIED`) -> `InventoryService`",
|
|
866
|
+
),
|
|
867
|
+
"CONFIGURES_PERSISTENCE": RelationshipSemanticsSpec(
|
|
868
|
+
relationship="CONFIGURES_PERSISTENCE",
|
|
869
|
+
meaning="Roblox server service configures a `DataStoreService:GetDataStore(...)` or `ProfileService.GetProfileStore(...)` persistence store.",
|
|
870
|
+
typical_source="Server service or module (`InventoryService`)",
|
|
871
|
+
typical_target="Canonical Roblox persistence entity (`persistence.roblox.datastore.<name>`)",
|
|
872
|
+
proves="Static persistence store binding (`FRAMEWORK_VERIFIED`), kept distinct from SQL tables.",
|
|
873
|
+
does_not_prove="Does not prove Roblox Studio API Services are enabled at runtime.",
|
|
874
|
+
common_tool="trace_path / analyze_impact / get_context",
|
|
875
|
+
example="`InventoryService` -> `CONFIGURES_PERSISTENCE` (`FRAMEWORK_VERIFIED`) -> `persistence.roblox.datastore.PlayerInventory_v1`",
|
|
876
|
+
),
|
|
877
|
+
"READS_PERSISTENCE": RelationshipSemanticsSpec(
|
|
878
|
+
relationship="READS_PERSISTENCE",
|
|
879
|
+
meaning="Function or method reads from a Roblox DataStore or ProfileStore (`GetAsync`, `LoadProfileAsync`).",
|
|
880
|
+
typical_source="Service method (`InventoryService.HandleInventoryRequest`)",
|
|
881
|
+
typical_target="Canonical Roblox persistence entity (`persistence.roblox.datastore.<name>`)",
|
|
882
|
+
proves="Static persistence read operation targeting the store (`FRAMEWORK_VERIFIED`).",
|
|
883
|
+
does_not_prove="Does not prove key existence or throttling budget at runtime.",
|
|
884
|
+
common_tool="trace_path / analyze_impact / get_context",
|
|
885
|
+
example="`InventoryService.HandleInventoryRequest` -> `READS_PERSISTENCE` (`FRAMEWORK_VERIFIED`) -> `persistence.roblox.datastore.PlayerInventory_v1`",
|
|
886
|
+
),
|
|
887
|
+
"WRITES_PERSISTENCE": RelationshipSemanticsSpec(
|
|
888
|
+
relationship="WRITES_PERSISTENCE",
|
|
889
|
+
meaning="Function or method writes or mutates a Roblox DataStore or ProfileStore (`SetAsync`, `UpdateAsync`, `IncrementAsync`, `RemoveAsync`, `Save`).",
|
|
890
|
+
typical_source="Service method (`InventoryService.HandleInventoryRequest`)",
|
|
891
|
+
typical_target="Canonical Roblox persistence entity (`persistence.roblox.datastore.<name>`)",
|
|
892
|
+
proves="Static persistence mutation targeting the store (`FRAMEWORK_VERIFIED`).",
|
|
893
|
+
does_not_prove="Does not prove runtime `pcall` success or DataStore queue limits.",
|
|
894
|
+
common_tool="trace_path / analyze_impact / get_context",
|
|
895
|
+
example="`InventoryService.HandleInventoryRequest` -> `WRITES_PERSISTENCE` (`FRAMEWORK_VERIFIED`) -> `persistence.roblox.datastore.PlayerInventory_v1`",
|
|
896
|
+
),
|
|
647
897
|
}
|
|
648
898
|
|
|
649
899
|
|
|
@@ -1248,7 +1498,7 @@ CodeGraph enforces nine canonical `evidence_class` values defined in `ALLOWED_EV
|
|
|
1248
1498
|
|
|
1249
1499
|
## 5. Relationship Model
|
|
1250
1500
|
|
|
1251
|
-
CodeGraph enforces the
|
|
1501
|
+
CodeGraph enforces the {len(ALLOWED_RELATIONSHIP_EVIDENCE_MATRIX)} canonical relationship types in `ALLOWED_RELATIONSHIP_EVIDENCE_MATRIX`. It **never** collapses framework routing, database operations, registry registration, or dependency injection into generic `CALLS` or `DEPENDS_ON`.
|
|
1252
1502
|
|
|
1253
1503
|
{relationships_block}
|
|
1254
1504
|
|
|
@@ -1547,7 +1797,7 @@ Repository -> Candidate Facts -> Task-Aware Filtering (RetrievalPolicy)
|
|
|
1547
1797
|
|
|
1548
1798
|
- **Hard Invariants & Output Boundaries of `get_context`**:
|
|
1549
1799
|
- Primary input is `query` (`task` is also supported as a string or `TaskSpec` dict alias).
|
|
1550
|
-
- Enforces strict output boundaries BEFORE MCP serialization: `max_tokens` (default `4000`, hard cap `20000`), `max_files` (default `
|
|
1800
|
+
- Enforces strict output boundaries BEFORE MCP serialization: `max_tokens` (default `4000`, hard cap `20000`), `max_files` (default `25`, hard cap `40`), and `max_lines` (default `500`, hard cap `1500`).
|
|
1551
1801
|
- Returns explicit budget metadata: `selected_tokens`, `candidate_tokens`, `selected_files`, `selected_lines`, `coverage_score`, and `truncated`.
|
|
1552
1802
|
- Preserves `unknowns` and `ambiguities` explicitly—never drops uncertainty to save tokens.
|
|
1553
1803
|
- Compresses duplicate `(source, target, relationship)` edges into a single record with `occurrence_count` and `supporting_locations`.
|
|
@@ -1768,6 +2018,7 @@ def render_tool_capabilities_summary() -> str:
|
|
|
1768
2018
|
| **`STATIC_VERIFIED`** | Proven by static SQL DDL/DML or migration parsing | Rely on table/column/query/migration relationship as verified static fact. |
|
|
1769
2019
|
| **`FRAMEWORK_VERIFIED`** | Proven by deterministic framework rules | Rely on route/ORM/DI/task/event relationship as verified framework fact. |
|
|
1770
2020
|
| **`DATAFLOW_VERIFIED`** | Proven by conservative local/container binding | Rely on resolved target as verified dataflow fact. |
|
|
2021
|
+
| **`ROJO_VERIFIED`** | Proven by deterministic Rojo `default.project.json` DataModel mapping | Rely on virtual-to-physical Luau module resolution as verified fact. |
|
|
1771
2022
|
| **`RUNTIME_OBSERVED`** | Observed in an ingested runtime trace (`observation_count >= 1`) | Treat as verified runtime execution fact; never promote to static `AST_VERIFIED` proof. |
|
|
1772
2023
|
| **`RUNTIME_UNOBSERVED`** | Not observed in the ingested runtime trace sample | Never claim the static path is dead code or impossible at runtime. |
|
|
1773
2024
|
| **`POSSIBLE`** | Plausible candidate, not statically guaranteed | Treat as lead; verify with targeted `get_file` / `read_file` before claiming as fact. |
|