@semiont/make-meaning 0.5.29 → 0.5.31

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.
package/README.md CHANGED
@@ -10,20 +10,33 @@
10
10
 
11
11
  This package implements the actor model from [ACTOR-MODEL.md](../../docs/system/ACTOR-MODEL.md). It owns the **Knowledge Base** and the seven actors that serve it.
12
12
 
13
- Five **access actors** mediate every read and write — the bus-facing interface of the Knowledge Base:
13
+ **The actors no longer run in one process.** Each container entry point in this package starts the subset it owns, and the gateway constructs **none** of them it keeps the HTTP surface, the bus door, and the job queue.
14
14
 
15
- - **Stower** (write) the single write gateway to the Knowledge Base; handles all resource and annotation mutations and job lifecycle events
16
- - **Browser** (read) handles all KB read queries: resources, annotations, events, annotation history, referenced-by lookups, entity type and tag-schema listing, the collaborator directory (the KB's declared software agents, derived from the workers/actors inference config), and directory browse (merging filesystem listings with KB metadata)
17
- - **Gatherer** (context assembly) — assembles gathered context for annotations (`gather:requested`) and resources (`gather:resource-requested`); searches vectors for semantically similar passages (adds `semanticContext` to `GatheredContext`)
18
- - **Matcher** (search/link) — context-driven candidate search with multi-source retrieval, composite structural scoring, and optional LLM semantic scoring
19
- - **CloneTokenManager** (yield) manages clone token lifecycle for resource cloning
15
+ | Service | Entry point | Actors |
16
+ | --- | --- | --- |
17
+ | **Archivist** | `@semiont/make-meaning/archivist-main` | Stower, Browser, CloneTokenManager |
18
+ | **Librarian** | `@semiont/make-meaning/librarian-main` | Gatherer, Matcher |
19
+ | **Smelter** | `@semiont/make-meaning/smelter-main` | Smelter |
20
+ | **Weaver** | `@semiont/make-meaning/weaver-main` | Weaver |
20
21
 
21
- Two **projection pipelines** follow the event log to keep the eventually-consistent read models in sync addressed by no one, replying to nothing:
22
+ `startMakeMeaning()` still assembles the **whole** set in one process that is what `LocalTransport`, scripts and tests use, and it is unchanged. `startMakeMeaningGateway()` is the split-topology root: same stores, no actors, a handler subset.
22
23
 
23
- - **Weaver** (project)subscribes to graph-relevant domain events and projects them into the graph database; carried on the KB record (`kb.weaver`) and rebuilt from the event log at startup (`rebuildAll()`)
24
- - **Smelter** (embed) — standalone embedding pipeline run via `@semiont/make-meaning/smelter-main` (not started by `startMakeMeaning`); subscribes to domain events, reads content from the KB working tree via `WorkerContentTransport`, chunks text, embeds via `@semiont/vectors`, and indexes into the vector store (Qdrant). On startup it reconciles Qdrant against the KS catalog — re-embedding what's missing or stale (every upsert is stamped with the embedded bytes' checksum, so changed content is detected) and deleting orphans — so a wiped Qdrant volume, or events missed while the worker was down, recover by restarting the smelter
24
+ ### The access actors the bus-facing interface of the Knowledge Base
25
25
 
26
- (The third derived read model the materialized views is not pipeline-maintained: the EventStore's `ViewManager` materializes views synchronously inside `appendEvent()` for a read-your-writes guarantee.)
26
+ - **Stower** (write, *Archivist*) the single write gateway to the Knowledge Base; handles all resource and annotation mutations and job lifecycle events. The only caller that appends events
27
+ - **Browser** (read, *Archivist*) — handles all KB read queries: resources, annotations, events, annotation history, referenced-by lookups, entity type and tag-schema listing, the collaborator directory (the KB's declared software agents, derived from the workers/actors inference config), and directory browse (merging filesystem listings with KB metadata)
28
+ - **Gatherer** (context assembly, *Librarian*) — assembles gathered context for annotations (`gather:requested`) and resources (`gather:resource-requested`); searches vectors for semantically similar passages (adds `semanticContext` to `GatheredContext`)
29
+ - **Matcher** (search/link, *Librarian*) — context-driven candidate search with multi-source retrieval, composite structural scoring, and optional LLM semantic scoring
30
+ - **CloneTokenManager** (yield, *Archivist*) — manages clone token lifecycle for resource cloning
31
+
32
+ **Stower and Browser stay together on purpose:** Stower writes the events and projections that Browser reads, so splitting them would open a cross-process read-after-write window over the same state. Git is single-writer for the same reason — the Archivist owns the working tree.
33
+
34
+ ### The projection pipelines — addressed by no one, replying to nothing
35
+
36
+ - **Weaver** (project, *Weaver service*) — subscribes to graph-relevant domain events and projects them into the graph database. It rebuilds from the event log only on an explicit `weave:rebuild`, so a projection-shape change needs that command, not just a restart
37
+ - **Smelter** (embed, *Smelter service*) — subscribes to domain events, reads content through `WorkerContentTransport`, chunks text, embeds via `@semiont/vectors`, and indexes into the vector store (Qdrant). It also owns anchored-text extraction. On startup it reconciles Qdrant against the KS catalog — re-embedding what's missing or stale (every upsert is stamped with the embedded bytes' checksum, so changed content is detected) and deleting orphans — so a wiped Qdrant volume, or events missed while it was down, recover by restarting it
38
+
39
+ (The third derived read model — the materialized views — is not pipeline-maintained: the EventStore's `ViewManager` materializes views synchronously inside `appendEvent()` for a read-your-writes guarantee. The Archivist rebuilds them at startup; unlike the graph, they need no explicit command.)
27
40
 
28
41
  All seven actors subscribe to the EventBus via RxJS pipelines and expose no public business methods — only `initialize()` and `stop()`, plus a startup recovery entry point on the pipelines (`rebuildAll()` / `reconcile()`). Callers communicate with the access actors by putting events on the bus.
29
42