Commit graph

1474 commits

Author SHA1 Message Date
elpresidank
4ec7e72532 Use managed runtimes for base processor facades 2026-06-02 02:45:11 -05:00
elpresidank
74955d6041 Use native runtimes for flow entrypoints 2026-06-02 02:34:03 -05:00
elpresidank
54fc21b38d Document client newable factory compatibility 2026-06-02 02:21:40 -05:00
elpresidank
1899bf1f5a Use tagged socket errors in client API 2026-06-02 02:19:37 -05:00
elpresidank
da23ac0657 Model websocket adapter failures with tagged errors 2026-06-02 02:15:22 -05:00
elpresidank
74ba05703a Manage client RPC runtime with Effect 2026-06-02 02:09:45 -05:00
elpresidank
710656be26 Move librarian state into synchronized refs 2026-06-02 01:59:51 -05:00
elpresidank
5f783832e9 Type librarian service runtime loop 2026-06-02 01:47:15 -05:00
elpresidank
e6384e65b9 Replace librarian throw helpers with Effect failures 2026-06-02 01:39:04 -05:00
elpresidank
459347ad12 Model librarian upload schema boundaries 2026-06-02 01:34:46 -05:00
elpresidank
3809a38c46 Migrate flow manager to ref-backed Effect state 2026-06-02 01:26:40 -05:00
elpresidank
ba64fc5add Normalize flow service runtime entrypoints 2026-06-02 01:13:40 -05:00
elpresidank
0da0df81c4 Migrate knowledge core service to ref-backed Effect state 2026-06-02 01:07:12 -05:00
elpresidank
5979d38b99 Remove RAG requestor Promise bridges 2026-06-02 00:54:47 -05:00
elpresidank
88db18fbda Migrate config service to ref-backed Effect runtime 2026-06-02 00:40:44 -05:00
elpresidank
b4ee2b691f Migrate strict Effect runtime surfaces 2026-06-02 00:22:04 -05:00
elpresidank
f6878d4dd7 Enforce strict Effect tsgo migrations 2026-06-01 23:19:54 -05:00
elpresidank
64fb23e7d0 Make gateway dispatcher requestors Effect-scoped 2026-06-01 22:17:50 -05:00
elpresidank
a0d2575273 Migrate request-response facade to Effect runtime 2026-06-01 22:11:03 -05:00
elpresidank
7f81c56c80 Add Effect-native rewrite audit playbook 2026-06-01 22:00:28 -05:00
elpresidank
b58e51bf75 Update Effect packages to beta 75 2026-06-01 21:16:38 -05:00
elpresidank
28f8bd87f1 Merge remote-tracking branch 'origin/master' into ts-port-effect-v4 2026-06-01 20:27:00 -05:00
elpresidank
dca2786828 Remove native classes from TS runtime 2026-06-01 20:26:47 -05:00
elpresidank
952daf325d Stabilize TS workbench QA and RPC timeouts 2026-06-01 17:23:34 -05:00
elpresidank
3515106670 Advance TS port Effect workbench 2026-06-01 16:22:25 -05:00
Jack Colquitt
97453d9b83
Change project title to 'The semantic deployment platform' (#968)
Updated the project title in the README.
2026-06-01 14:08:30 -07:00
Jack Colquitt
6dfa47aac8
Revise README for semantic infrastructure terminology (#962)
Updated the README to reflect changes in terminology and improve clarity regarding the platform's features.
2026-05-30 17:07:19 -07:00
elpresidank
92dae8c374 Merge remote-tracking branch 'origin/master' into ts-port-effect-v4 2026-05-30 09:59:12 -05:00
elpresidank
5776171d27 saving 2026-05-30 09:56:23 -05:00
Cyber MacGeddon
dcee842455 Merge branch 'release/v2.5' 2026-05-28 11:26:43 +01:00
cybermaggedon
a92dfa0b8a Fix HF build issue (#958)
Added click to the pip install line. Looks like huggingface-hub 1.13.0
added a CLI dependency on click but didn't declare it as a hard
requirement (or it's only required for the CLI entrypoint). Needed to
unblock the build.
2026-05-28 11:23:46 +01:00
cybermaggedon
7457662d74
Remove unwanted (#957)
Extra copies of test data removed
2026-05-28 11:08:58 +01:00
cybermaggedon
a4fa9f617f feat: replace external sample documents with bundled demo content (#956)
Replaces the URL-based PDF downloads in tg-load-sample-documents with
seven curated, locally bundled documents covering diverse topics (recipes,
Belgian beer, trade routes, corporate scandals, pets, fortifications,
Bronze Age collapse). Documents are packaged as data files within
trustgraph-cli and loaded from metadata.json, removing the dependency
on external URLs and the doc-cache mechanism.
2026-05-28 11:06:52 +01:00
Jacob Molz
eb24d0c60e
Merge pull request #955 from jmolz/fix-socket-client-bare-excepts
fix: avoid socket client bare excepts
2026-05-27 13:16:33 +01:00
cybermaggedon
00dd7a4e14
Merge pull request #954 from jmolz/fix-prompt-manager-bare-excepts
fix: avoid swallowing prompt manager interrupts
2026-05-26 16:57:38 +01:00
Jacob Molz
8a8e496acf fix: avoid swallowing prompt manager interrupts 2026-05-26 10:37:21 -04:00
cybermaggedon
f8e8c0e9e6
Merge pull request #952 from jmolz/fix-load-sample-doc-cache
fix: avoid swallowing sample document cache errors
2026-05-26 15:03:36 +01:00
cybermaggedon
36eadbda3a
Merge pull request #953 from trustgraph-ai/release/v2.5
release/v2.5 -> master
2026-05-26 15:01:44 +01:00
Jacob Molz
7ca41fa893
fix: avoid swallowing cache directory errors 2026-05-26 09:47:22 -04:00
cybermaggedon
4200b5d683
fix: update library_client for workspace-based tenancy (#951)
Replace removed `user` parameter with `workspace` support following
the tenancy axis change in #840. Adds -w/--workspace flag and
$TRUSTGRAPH_WORKSPACE env var.
2026-05-26 14:35:54 +01:00
cybermaggedon
6d07310d2b
fix: repair broken imports in OntoRAG query module (#950)
Replace hallucinated relative imports with correct absolute imports
across the ontology query package, and fix OntologyMatcher reference
to match the actual class name OntologyMatcherForQueries. Simplify
test to use standard imports instead of importlib hack.

Cosmetic, but simpler imports provides undeterministic imports in a dev
environment, and also means we're properly testing linkage
2026-05-26 13:12:03 +01:00
Jacob Molz
c10f2694a0
fix: safely parse metric labels (#948) 2026-05-26 12:43:58 +01:00
cybermaggedon
6af12f416f
SPARQL engine: streaming evaluation, bind joins, and expression fixes (#947)
Convert the SPARQL algebra evaluator from eager list-based evaluation to
lazy async generators so results stream incrementally. This lets Slice
terminate early (via generator cleanup) and avoids materialising full
result sets for streamable operators like Project, Filter, Union, and
Extend. Blocking operators (Join, LeftJoin, OrderBy, Group) materialise
at their boundary then yield.

Add bind join optimization for Join nodes where one side is small
(VALUES/ToMultiSet): instead of materialising both sides independently
and hash-joining, iterate the small side's bindings and evaluate the
large side with those bindings pre-seeded. This turns wildcard BGP
queries into selective ones — e.g. VALUES ?x { <uri> } joined with a
BGP now queries the triple store with ?x bound rather than fetching
all triples.

Add TriplesClient.query_gen() async generator that wraps the existing
streaming callback API via an asyncio.Queue bridge, yielding individual
Triple objects as batches arrive.

Add streaming request path in the SPARQL query service that batches
solutions from the live async generator and sends them as they fill.

Fix FILTER IN/NOT IN: rdflib represents these as RelationalExpression
nodes with op="IN", not as Builtin_IN — handle both representations.

Fix Builtin_IN/Builtin_NOTIN dispatch ordering so the specific handlers
are checked before the generic Builtin_ prefix match.

Fix VALUES handling for rdflib's two representations: positional
(var/value) and dict-based (res).
2026-05-21 15:49:14 +01:00
cybermaggedon
81e9a3ebe4
fix: stop pushing SPARQL LIMIT into child algebra nodes (#946)
The Slice evaluator was propagating the SPARQL LIMIT value as the
inner limit for child evaluations, starving LeftJoin (OPTIONAL) and
other operators of results. The safety limit parameter should flow
through unchanged; LIMIT/OFFSET are applied only at the Slice node.
2026-05-21 12:24:38 +01:00
cybermaggedon
2c3a699af3
feat: extend SPARQL evaluator with comprehensive function and operator support (#945)
Add 30+ SPARQL 1.1 built-in functions and the MINUS algebra operator to the
custom SPARQL query backend.

String functions:
- SUBSTR (2-arg and 3-arg forms), STRBEFORE, STRAFTER
- REPLACE (regex with flags), ENCODE_FOR_URI

Numeric functions:
- FLOOR, CEIL, ROUND, ABS

Date/time accessors:
- YEAR, MONTH, DAY, HOURS, MINUTES, SECONDS
- NOW, TZ

Hash functions:
- MD5, SHA1, SHA256, SHA512

Term constructors:
- IRI/URI, BNODE, UUID, STRUUID

Other functions:
- LANGMATCHES, RAND
- EXISTS / NOT EXISTS (with async pre-evaluation to bridge the
  sync expression evaluator and async algebra evaluator)

Algebra:
- MINUS set-difference operator
- HAVING already works via rdflib's Filter mapping (verified)

Fix SPARQL ORDER handling

Includes 653 lines of new unit tests covering all added functionality
across expressions, solutions, and algebra layers.
2026-05-21 10:50:11 +01:00
cybermaggedon
e57f4669e1
Update rev-gateway for IAM integration (#940)
service.py:
- Constructor takes **config (same pattern as api-gateway) instead
  of individual args
- Creates IamAuth and calls await self.auth.start() before the
  message loop
- Passes auth to both ConfigReceiver and MessageDispatcher
- Uses add_pubsub_args / add_logging_args instead of hand-rolled
  Pulsar args
- Passes timeout through

dispatcher.py:
- Accepts auth and timeout parameters
- Passes both to DispatcherManager — fixes the missing auth argument
  that would have crashed on startup

The remote end's requests now go through the same IAM authentication
path as api-gateway. Token validation, workspace resolution, and
permissions all work identically regardless of which direction
initiated the connection.

Fixed tests — the test now passes auth and timeout to MessageDispatcher
and verifies they're forwarded to DispatcherManager.

Update rev gateway dispatcher to align with IAM.  A "token" parameter
must be passed with each message.

Fix websocket relay to align with rev-gateway changes, conforms to
the api-gateway protocol.
2026-05-19 21:45:43 +01:00
Cyber MacGeddon
4e3bd85abc Merge branch 'master' into release/v2.5 2026-05-19 18:57:26 +01:00
Cyber MacGeddon
668b64742f Merge branch 'release/v2.4' 2026-05-19 18:01:35 +01:00
cybermaggedon
66912d9f55
Open 2.5 release branch (#939) 2026-05-19 16:07:27 +01:00
cybermaggedon
fd6e3e1269
fix: stop dropping messages on Pulsar flow restarts (#938)
consumer.py called unsubscribe() on every flow stop, deleting the
server-side subscription cursor. On restart, initial_position='latest'
skipped any messages published during the gap — causing intermittent
data loss (e.g. graph embeddings silently never reaching Qdrant).

Replace unsubscribe() with close() so the cursor survives restarts.
Move subscription cleanup to where it belongs: the Pulsar backend's
delete_topic(), called by the flow controller on deliberate flow
deletion. This was previously a no-op TODO.
2026-05-19 13:26:39 +01:00