@semiont/make-meaning 0.5.5 → 0.5.6
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 +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +29 -5
- package/dist/index.js.map +1 -1
- package/package.json +9 -5
package/README.md
CHANGED
|
@@ -93,7 +93,7 @@ All meaningful actions flow through the EventBus. The KB actors are reactive —
|
|
|
93
93
|
graph TB
|
|
94
94
|
Routes["Backend Routes"] -->|commands| BUS["Event Bus"]
|
|
95
95
|
Workers["Job Workers"] -->|commands| BUS
|
|
96
|
-
EBC["
|
|
96
|
+
EBC["SemiontClient"] -->|commands| BUS
|
|
97
97
|
|
|
98
98
|
subgraph ks ["Knowledge System"]
|
|
99
99
|
STOWER["Stower<br/>(write)"]
|
package/dist/index.d.ts
CHANGED
|
@@ -348,6 +348,11 @@ declare class Matcher {
|
|
|
348
348
|
/**
|
|
349
349
|
* Search vectors for semantically similar resources.
|
|
350
350
|
* Returns empty array if vectors or embedding provider are not configured.
|
|
351
|
+
*
|
|
352
|
+
* No entity-type filter: the annotation's entity types are a ranking signal
|
|
353
|
+
* (Jaccard + IDF in `contextDrivenSearch`), not an inclusion gate. Gating
|
|
354
|
+
* recall here would hide vector-similar but differently-tagged candidates
|
|
355
|
+
* from the scorer.
|
|
351
356
|
*/
|
|
352
357
|
private searchVectors;
|
|
353
358
|
stop(): Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -9761,6 +9761,9 @@ var GraphDBConsumer = class _GraphDBConsumer {
|
|
|
9761
9761
|
this.coreEventBus = coreEventBus;
|
|
9762
9762
|
this.logger = logger;
|
|
9763
9763
|
}
|
|
9764
|
+
eventStore;
|
|
9765
|
+
graphDb;
|
|
9766
|
+
coreEventBus;
|
|
9764
9767
|
// Event types that produce GraphDB mutations — filter everything else
|
|
9765
9768
|
static GRAPH_RELEVANT_EVENTS = /* @__PURE__ */ new Set([
|
|
9766
9769
|
"yield:created",
|
|
@@ -10891,6 +10894,10 @@ var Gatherer = class {
|
|
|
10891
10894
|
this.embeddingProvider = embeddingProvider;
|
|
10892
10895
|
this.logger = logger;
|
|
10893
10896
|
}
|
|
10897
|
+
kb;
|
|
10898
|
+
eventBus;
|
|
10899
|
+
inferenceClient;
|
|
10900
|
+
embeddingProvider;
|
|
10894
10901
|
subscriptions = [];
|
|
10895
10902
|
logger;
|
|
10896
10903
|
async initialize() {
|
|
@@ -11012,6 +11019,10 @@ var Matcher = class {
|
|
|
11012
11019
|
this.embeddingProvider = embeddingProvider;
|
|
11013
11020
|
this.logger = logger;
|
|
11014
11021
|
}
|
|
11022
|
+
kb;
|
|
11023
|
+
eventBus;
|
|
11024
|
+
inferenceClient;
|
|
11025
|
+
embeddingProvider;
|
|
11015
11026
|
subscriptions = [];
|
|
11016
11027
|
logger;
|
|
11017
11028
|
async initialize() {
|
|
@@ -11083,7 +11094,7 @@ var Matcher = class {
|
|
|
11083
11094
|
this.kb.graph.searchResources(searchTerm),
|
|
11084
11095
|
annotationEntityTypes.length > 0 ? this.kb.graph.listResources({ entityTypes: annotationEntityTypes, limit: 50 }).then((r) => r.resources) : Promise.resolve([]),
|
|
11085
11096
|
// 4. Semantic match — vector similarity search (if vectors configured)
|
|
11086
|
-
this.searchVectors(searchTerm
|
|
11097
|
+
this.searchVectors(searchTerm)
|
|
11087
11098
|
]);
|
|
11088
11099
|
const neighborResources = await Promise.all(
|
|
11089
11100
|
connections.map(
|
|
@@ -11291,15 +11302,19 @@ For each candidate, output a line with the number and score, like:
|
|
|
11291
11302
|
/**
|
|
11292
11303
|
* Search vectors for semantically similar resources.
|
|
11293
11304
|
* Returns empty array if vectors or embedding provider are not configured.
|
|
11305
|
+
*
|
|
11306
|
+
* No entity-type filter: the annotation's entity types are a ranking signal
|
|
11307
|
+
* (Jaccard + IDF in `contextDrivenSearch`), not an inclusion gate. Gating
|
|
11308
|
+
* recall here would hide vector-similar but differently-tagged candidates
|
|
11309
|
+
* from the scorer.
|
|
11294
11310
|
*/
|
|
11295
|
-
async searchVectors(searchTerm
|
|
11311
|
+
async searchVectors(searchTerm) {
|
|
11296
11312
|
if (!this.kb.vectors || !this.embeddingProvider || !searchTerm.trim()) return [];
|
|
11297
11313
|
try {
|
|
11298
11314
|
const embedding = await this.embeddingProvider.embed(searchTerm);
|
|
11299
11315
|
const results = await this.kb.vectors.searchResources(embedding, {
|
|
11300
|
-
limit:
|
|
11301
|
-
scoreThreshold: 0.4
|
|
11302
|
-
filter: entityTypes.length > 0 ? { entityTypes } : void 0
|
|
11316
|
+
limit: 40,
|
|
11317
|
+
scoreThreshold: 0.4
|
|
11303
11318
|
});
|
|
11304
11319
|
return results.map((r) => ({
|
|
11305
11320
|
resourceId: String(r.resourceId),
|
|
@@ -11328,6 +11343,8 @@ var Stower = class {
|
|
|
11328
11343
|
this.eventBus = eventBus;
|
|
11329
11344
|
this.logger = logger;
|
|
11330
11345
|
}
|
|
11346
|
+
kb;
|
|
11347
|
+
eventBus;
|
|
11331
11348
|
subscription = null;
|
|
11332
11349
|
logger;
|
|
11333
11350
|
async initialize() {
|
|
@@ -11779,6 +11796,10 @@ var Browser = class {
|
|
|
11779
11796
|
this.project = project;
|
|
11780
11797
|
this.logger = logger;
|
|
11781
11798
|
}
|
|
11799
|
+
views;
|
|
11800
|
+
kb;
|
|
11801
|
+
eventBus;
|
|
11802
|
+
project;
|
|
11782
11803
|
subscriptions = [];
|
|
11783
11804
|
logger;
|
|
11784
11805
|
async initialize() {
|
|
@@ -12235,6 +12256,8 @@ var CloneTokenManager = class {
|
|
|
12235
12256
|
this.eventBus = eventBus;
|
|
12236
12257
|
this.logger = logger;
|
|
12237
12258
|
}
|
|
12259
|
+
kb;
|
|
12260
|
+
eventBus;
|
|
12238
12261
|
subscriptions = [];
|
|
12239
12262
|
logger;
|
|
12240
12263
|
tokens = /* @__PURE__ */ new Map();
|
|
@@ -12984,6 +13007,7 @@ var LocalContentTransport = class {
|
|
|
12984
13007
|
constructor(ks) {
|
|
12985
13008
|
this.ks = ks;
|
|
12986
13009
|
}
|
|
13010
|
+
ks;
|
|
12987
13011
|
async putBinary(_request, _options) {
|
|
12988
13012
|
throw new Error(
|
|
12989
13013
|
"LocalContentTransport does not support putBinary() \u2014 create resources via bus emits (mark/yield namespaces) in local mode"
|