- Add _ttl_block() helper to accumulate all predicate-object pairs before
writing, producing a single valid Turtle subject block terminated by one
period — eliminates the bug where rdfs:subClassOf / domain / range were
appended after a closed '.' block
- Add missing data_properties loop to _export_owl_turtle so
owl:DatatypeProperty declarations are no longer silently dropped
- Add _escape_ttl_str() to escape quotes, backslashes, newlines, carriage
returns, and tabs inside Turtle string literals (rdfs:label, rdfs:comment,
owl:versionInfo)
- Unify optional-field null checks to consistent x = prop.get(); if x: pattern
- Add 43 tests in tests/export/test_owl_exporter.py covering syntax validity,
data properties, string escaping, null handling, and header output
- Update CHANGELOG.md with [Unreleased] entry
Closes#478
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Extend PathResponse with hop_count (len(path)-1) and distance_band
("direct"|"near"|"mid-range"|"distant") as first-class API fields
- Add classify_path_distance() to semantica/utils/helpers.py as the
single source of truth for hop-count thresholds; both the route and
the visualizer import from it, eliminating duplicate threshold logic
- Populate hop_count and distance_band in find_path route via
classify_path_distance(); remove local _classify_distance() copy
- Add highlight_path: list[str] param to KGVisualizer.visualize_network;
path edges rendered as a distance-aware orange trace (opacity and
stroke width scale from direct→distant: 1.0/4px to 0.35/1.5px)
- Fix bidirectional edge lookup: only forward pairs (A→B) along the
path are added to path_edge_set; reverse back-edges in directed
graphs are no longer incorrectly highlighted
- Add logger.warning when highlight_path contains node IDs absent from
the layout position map, surfacing silent no-op mismatches
- Extend frontend PathResponse type in GraphInspectorPanel.tsx and
GraphWorkspaceShell.tsx with hop_count: number and distance_band
literal union to match the updated API contract
- Add 10 new tests: 2 API-level and 8 unit tests covering all four
band boundaries (0, 1, 2, 3, 4, 6, 7, 20 hops); 104 explorer tests
pass, 0 failures introduced
- Update CHANGELOG.md
- PathFinder.bfs_shortest_path() and dijkstra_shortest_path() gain a
directed: bool = True parameter. When False, a temporary undirected
view (graph.to_undirected()) is used for traversal only; the original
directed edges are preserved and returned in the response.
- _make_undirected_view() helper added to PathFinder; falls back safely
for non-NetworkX graph types.
- GET /api/graph/node/{id}/path exposes ?directed=false query param.
- PathResponse gains a directed: bool field echoing the mode used.
- Route now returns 404 on empty path (previously returned 200 with
path: []).
- 21 new tests: 12 unit (TestBidirectionalPathFinding) + 9 API-level
(TestBidirectionalPathRoute). All 120 tests pass.
- CHANGELOG updated under [Unreleased].
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add semantica/kg/knowledge_graph.py with KnowledgeGraph dataclass
(entities, relationships, metadata) plus __len__ and __bool__ helpers
- Export KnowledgeGraph from semantica/kg/__init__.py
- Add KGVisualizer._convert_knowledge_graph() for explicit, non-mutating
conversion from KnowledgeGraph to internal dict format
- Route isinstance(graph, KnowledgeGraph) through _convert_knowledge_graph
inside _normalize_graph so all five visualize_* entry points accept
KnowledgeGraph directly without any manual conversion
- Add TestFormalKnowledgeGraphType (15 tests)
Closes#471
- routes/graph.py: raise HTTPException(404) for missing nodes; wrap path_finder call in try/except → HTTPException(404)
- routes/decisions.py: raise HTTPException(404) on chain, compliance, precedents sub-routes
- routes/annotations.py: raise HTTPException(404) on create (missing node) and delete (missing annotation)
- routes/enrich.py: raise HTTPException(404/503/422) for missing nodes, unavailable services, and extraction errors
- routes/temporal.py: fix TemporalPatternDetector method name detect_patterns → detect_temporal_patterns
- explorer/app.py: root / now serves built index.html when available, falls back to minimal HTML shell; add HTMLResponse import
- tests/explorer/test_explorer_api.py: test_extract accepts 503 (spacy/transformers not installed is a valid service state)
All 45 explorer API integration tests pass.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* Clarify plugin README install and usage steps
* feat(explorer): add welcome message to root endpoint and bump version to 0.4.0
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs(plugins): update all plugin READMEs for v0.4.0 with full platform list
- Rewrite main community guide with platform table (8 plugins), skills/agents
inventory, Knowledge Explorer section, and per-platform install steps
- Add v0.4.0 badge and Knowledge Explorer section to VS Code, Cline,
Continue, Windsurf, and OpenClaw READMEs
- Fix inconsistent tool count (12 → 17) across all READMEs
- Bump Python requirement from 3.8+ to 3.10+ across all plugins
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs: add PR description for utils → main
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: remove PR_DESCRIPTION.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove duplicate integrations table from bottom of README
- Move Agentic Frameworks section to top alongside AI tools table
- Show only Agno as supported; list LangChain, LangGraph, CrewAI, LlamaIndex, AutoGen, OpenAI Agents SDK, Google ADK as coming soon
- Add logo icons for all agentic frameworks matching existing plugin style
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add integrations/openclaw/ with OpenClawKGTool (REST) and
OpenClawMCPConfig (mcporter.json generator)
- Add plugins/.openclaw-plugin/ bundle (plugin.json, marketplace.json,
README) with MCP + native tool support
- Add OpenClaw badge to README header
- Reorganize "Works With Every AI Tool" table into labeled groups:
Native Plugin Bundle, MCP Server + Plugin, MCP Server, REST API
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
KGVisualizer.visualize_network() (and sibling methods) only accepted a raw
dict. Passing a KnowledgeGraph object — the natural output of
GraphBuilder.build() — silently returned without rendering.
Added _normalize_graph() which duck-types the input: dicts pass through
unchanged; any object exposing .entities / .relationships attributes is
converted to the canonical dict form; anything else raises a clear
ProcessingError naming the offending type.
_normalize_graph() is called as the first statement in visualize_network(),
visualize_communities(), visualize_centrality(), visualize_entity_types(),
and visualize_relationship_matrix().
Also adds 21 tests in tests/visualization/test_kg_visualizer_normalize_graph.py
covering the helper directly, the end-to-end regression for #458, and
a guard that every public method routes through _normalize_graph.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
End-to-end example using DatalogReasoner, GraphBuilder, ContextGraph,
GraphAnalyzer, ExplanationGenerator, DatalogFact, and DatalogRule.
Covers ancestor query, KG dependency analysis, RBAC policy, and org hierarchy.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 21:43:04 +05:30
Mohd KaifandCopilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Tools grid:
- Claude Code/Cursor/Codex: 'Native plugin' (plugins/ dirs exist in repo)
- All other tools: 'REST API' (no MCP server impl in codebase — Semantica
has an MCP CLIENT for ingesting from MCP servers, not an MCP server)
- Codex CLI added back (has real plugin bundle at plugins/.codex-plugin/)
Plugin Bundles section:
- Full table of all 17 skills with descriptions matching SKILL.md files
- Full table of all 3 agents (kg-assistant, decision-advisor, explainability)
- Hooks entry referencing plugins/hooks/hooks.json
MCP Client section:
- Correct framing: MCPClient in semantica/ingest/mcp_client.py pulls
data FROM MCP servers into KG (not an MCP server itself)
- Code snippet + supported schemes
REST API Server section:
- Lists all 10 route modules from semantica/explorer/routes/ with paths
- WebSocket /ws endpoint
- Health check
Agno integration section:
- Expanded to table showing all 5 actual files in integrations/agno/
with class names and descriptions matching source code
AI Coding Tools table:
- Corrected connection types and setup notes to match actual code
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add 'AI Coding Tools & IDEs' table under Integrations listing every
tool from the visual grid with connection type and setup note:
Claude Code, Cursor, Windsurf, Claude Desktop, VS Code, GitHub
Copilot, Cline, Roo Code, Continue, Goose, Kilo Code, Aider,
Amazon Q, Zed, Claude SDK, REST API (109 endpoints)
- Add Neo4j to Graph Databases list (was in modules but missing here)
- Add Email and Repository ingestors to Data Sources
- Expand LLM Providers: add Groq, HuggingFace, Ollama entries
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AI tools grid (removed Gemini CLI, Codex CLI; added VS Code, GitHub
Copilot, Continue, Amazon Q, Zed — all confirmed MCP-supporting tools
with significant user bases in 2026):
Row 1: Claude Code, Cursor, Windsurf, Claude Desktop, VS Code,
GitHub Copilot, Cline, Roo Code
Row 2: Continue, Goose, Kilo Code, Aider, Amazon Q, Zed,
Claude SDK, Any agent REST API
Agentic frameworks grid (added LangGraph and OpenAI Agents SDK, expanded
to 8 entries): Agno, LangChain, LangGraph, LlamaIndex, AutoGen, CrewAI,
OpenAI Agents SDK, Google ADK
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- New '🖥️ Semantica Knowledge Explorer' section placed after Plugins,
with a workspace-tab table (Graph, Timeline, Decisions, Registry,
Entity Resolution, KG Overview, Ontology), a 4-line quick-start
snippet, requirements line, and a pointer to explorer/README.md
- Added explorer/ row to the detailed Modules table with a link
- Added explorer/ bullet to the condensed Modules list
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- GraphWorkspace: set isRunningPredictions=true before link-prediction fetch
and false in finally block; pass isRunningPredictions prop to
LazyGraphInspectorPanel so the inspector button disables and shows a
spinner during the request (was declared but never wired — broke
noUnusedLocals TypeScript build)
- DecisionWorkspace: add AbortController to the /api/decisions useEffect
so the fetch is cancelled on unmount; add per-call AbortController to
handleSelectDecision for /api/decisions/:id/chain; add res.ok guards
before .json() on both fetches; encodeURIComponent on decision_id to
prevent path-injection edge cases
- index.css: add missing @keyframes skeleton-pulse rule (0%/100% opacity
0.45, 50% opacity 0.85) — KGOverviewTab skeletonBarStyle referenced
this animation but it was never defined, leaving skeleton bars static
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Documents all 12 vulnerability fixes (CRITICAL→LOW), 4 post-review bug
fixes, and CodeQL infrastructure changes under [Unreleased] following
the existing Keep a Changelog format.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fix(agent_memory): implement MemoryItem.to_dict() / from_dict() for safe JSON
persistence — timestamps serialised via isoformat(), embeddings dropped (not
JSON-safe, regenerated on demand); save() and load() now round-trip correctly
without TypeError or AttributeError (Bug #1)
fix(sparql): add asyncio.Semaphore(_SPARQL_MAX_CONCURRENT=4) around graph.query
so timed-out threads cannot exhaust the default ThreadPoolExecutor; add
`truncated: bool` field to SparqlResponse so callers know when the 5 000-row
cap was hit (Bug #2)
fix(export_import): trim _ALLOWED_IMPORT_EXTENSIONS to {.json, .csv} — the only
formats the handler actually parses; removes .graphml/.gexf/.ttl/.rdf that
passed the allowlist check but hit a hard 422 inside the handler (Bug #3)
fix(codeql): remove blanket rule-ID auto-dismiss job; replace with a commented
template for pinning specific alert numbers — prevents future real alerts of
the same rule being silently suppressed (Bug #4)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 14:35:30 +05:30
Mohd KaifandCopilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>