Commit Graph

13 Commits

Author SHA1 Message Date
Ubuntu df6c77255a fix(simulation): fix SQLite lock on Azure Files and Neo4j clone query
- Add nobrl,cache=strict,nosharesock,actimeo=30 mount options to the
  Azure Files volume so SQLite can use byte-range locking correctly over
  SMB (without nobrl, Reddit DB creation fails with 'database is locked')
- Fix _execute_neo4j_query to pass parameters as params= keyword arg
  (was parameters_= which the installed neo4j driver does not accept),
  restoring per-simulation graph isolation via clone_graph

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 22:49:38 +00:00
Ubuntu 5ec98a3e0e fix(graph): use get_running_loop() in _execute_neo4j_query, unify delete_graph to single async-backed method 2026-05-03 22:10:14 +00:00
Ubuntu 6ea83f31a4 feat(graph): add clone_graph and delete_graph to GraphitiBackend via APOC
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 22:05:19 +00:00
Ubuntu 656a3d7d5c fix(graph): cap get_all_edges to 5000 edges to prevent unbounded RAM growth 2026-04-26 14:50:21 +00:00
Ubuntu d09ee23cd3 feat: ontology import, project recovery, graphiti improvements, and docs
- Add ontology import from file (Step 1)
- Persist active task_id to project.json for browser-refresh recovery
- Add project list endpoint and frontend recovery UI
- Improve Graphiti backend stability and oasis profile generation
- Add TechnicalDesign.md and enterprise roadmap spec
- Update .gitignore to exclude secrets and local-only docs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 14:28:14 +00:00
Ubuntu c074136a87 fix(llm): centralise Azure URL normalisation in parse_azure_url utility
Extract parse_azure_url from graphiti_backend into utils/llm_client so all
services (oasis_profile_generator, simulation_config_generator, graphiti_backend,
LLMClient) strip the /chat/completions suffix and api-version before passing
base_url to the OpenAI SDK, fixing 404 errors when the full Azure endpoint URL
is set in LLM_BASE_URL.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 21:09:48 +00:00
Ubuntu e7ebcdff75 fix(graphiti): patch _extract_entity_attributes to flatten nested attr dicts
The previous fix applied _flatten_attributes too broadly, breaking graphiti's
internal ExtractedEntities validation (lists were converted to strings).

Instead, monkey-patch only _extract_entity_attributes — the exact function
that returns entity attribute dicts to node.attributes before Neo4j write.
Lists of primitives are preserved; only dict-valued attributes are flattened.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 20:24:08 +00:00
Ubuntu 6bce05dca2 fix(graphiti): flatten nested attribute dicts before Neo4j write; hide summary from properties panel
Graphiti's attribute extraction LLM sometimes returns values wrapped in
nested dicts ({"value": "CTTI"}) instead of plain strings. Neo4j rejects
these with TypeError: "Property values can only be of primitive types".

Fix: after _AzureGenericClient gets the LLM response, validate it through
the Pydantic response_model and call _flatten_attributes() so every value
reaching Neo4j is a scalar. Also add _flatten_attributes() helper.

UI: exclude 'summary' from the Properties section of the node detail panel
since it already appears in the dedicated Summary section below.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 20:08:39 +00:00
Ubuntu dfabab5343 feat(graph): expand ontology to 20 types, pass attributes to Graphiti, add retry
- ontology_generator: increase entity limit to 20 (18 specific + 2 fallback),
  edge types to 20 (12-20 requested); bump max_tokens to 8192
- ontology_generator: fallback type names (Person/Organization) now resolved
  via i18n so Catalan gets Persona/Organització
- locales: add ontologyFallback* keys to en/zh/es/ca
- graph_builder: pass entity/edge attributes to non-Zep set_ontology (were discarded)
- graphiti_backend: _make_model builds real Pydantic fields per attribute
- graphiti_backend: _build_extraction_instructions includes per-entity attribute
  hints so the LLM knows which fields to extract
- graphiti_backend: add_batch retries up to 3x on "node not found" race condition
  with exponential backoff (2s, 4s) before propagating the error

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 19:19:28 +00:00
Ubuntu 788f9c29c9 feat(graph): add GraphitiBackend for Neo4j+graphiti-core local deployment 2026-04-25 13:10:56 +00:00
Ubuntu e073ef8716 feat(graph): add GraphBackendFactory singleton 2026-04-25 12:59:56 +00:00
Ubuntu 247ecc86ae feat(graph): add ZepBackend adapter implementing GraphBackend 2026-04-25 11:29:59 +00:00
Ubuntu a75b7cf75a feat(graph): add GraphBackend abstract interface 2026-04-25 11:11:06 +00:00