feat: Cypher-style query DSL (Phase 3C.4)#13
Merged
Conversation
…n plan 17 tasks: calibration model + migration, export service, subgraph global mode with pivotality scoring, calibrate/export endpoints, tests, global chain view page, engagement filter chips, timeline scrubber, ForceGraphCanvas extensions (kill chain layout, time filter, pivotality glow, engagement colors), CLI commands. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
15 tasks covering parser, planner, virtual graph, executor, CLI commands, web endpoints, and inline overlay. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements builtins.py (length, nodes, relationships, has_entity, has_mitre, collect) and PluginFunctionRegistry with dotted-name enforcement and scalar/aggregation separation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements plan_query() converting CypherQuery AST into QueryPlan with PlanStep sequence (scan, expand, var_length_expand, filter) and pushes WHERE predicates down to the earliest bound-variable scan/expand step. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements VirtualGraph, VirtualGraphBuilder, and VirtualGraphCache that overlay entity nodes (Host, IP, CVE, Domain, Port, MitreAttack, Entity) and MENTIONED_IN edges on top of the MasterGraph's finding nodes and LINKED edges, enabling the Cypher DSL executor to traverse both node types in a single graph walk. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add fetch_all_mentions_in_scope to ChainStoreProtocol (with optional engagement_ids filter) and wire up 2 end-to-end integration tests that exercise the full parse→plan→VirtualGraphCache→execute pipeline via mocks. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rename existing `query` command to `query preset` under a new `query_app` sub-typer, and add `query run`, `query explain`, and `query repl` commands backed by CypherSession. Update existing tests to use the new `query preset` path and add test_cli_query.py covering all four subcommands. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add /api/chain/query POST endpoint that validates Cypher queries (parse + plan) and returns proper 400 errors; GET /functions lists builtins. Full store execution deferred until PostgresChainStore implements fetch_all_mentions_in_scope. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds ChainQueryView, CypherEditor, and QueryResultsPane components plus the /chain/query route for the standalone Cypher DSL query UI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…xecution Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Combines 3C.4 Cypher DSL with 3C.3 additions: - cli.py: keep both query sub-app and calibrate command - ForceGraphCanvas: merge highlightedNodeIds with timeRange/layoutMode/colorMode props - router: add both /chain/query and /chain/global routes - ChainGraphView: merge InlineQueryPanel with ChainTimelineScrubber imports Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
opentools chain query run,explain,repl(stateful sessions with named result sets), andpreset(migrated existing preset runner)POST /api/chain/queryendpoint with full execution, standalone query page (/chain/query) with CodeMirror 6 editor + autocomplete, and inline collapsible query panel on the chain graph view with node highlightingfetch_all_mentions_in_scopefor building the virtual graphTest plan
/chain/query, run a query, verify results renderopentools chain query run 'MATCH (a:Finding) RETURN a'in CLIopentools chain query repl— test multi-line, session variables,:help🤖 Generated with Claude Code