@semiont/make-meaning 0.3.5 → 0.3.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/dist/index.js +32 -25
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9965,6 +9965,18 @@ function resolveWorkerInference(config, workerType) {
|
|
|
9965
9965
|
);
|
|
9966
9966
|
}
|
|
9967
9967
|
|
|
9968
|
+
// src/agent-utils.ts
|
|
9969
|
+
function inferenceConfigToGenerator(workerType, config) {
|
|
9970
|
+
const providerLabel = config.type === "ollama" ? `Ollama ${config.model}` : config.type === "anthropic" ? `Anthropic ${config.model}` : config.type != null ? `${config.type} ${config.model}` : void 0;
|
|
9971
|
+
return {
|
|
9972
|
+
"@type": "SoftwareAgent",
|
|
9973
|
+
name: providerLabel ? `${workerType} / ${providerLabel}` : workerType,
|
|
9974
|
+
worker: workerType,
|
|
9975
|
+
inferenceProvider: config.type,
|
|
9976
|
+
model: config.model
|
|
9977
|
+
};
|
|
9978
|
+
}
|
|
9979
|
+
|
|
9968
9980
|
// src/service.ts
|
|
9969
9981
|
var import_rxjs8 = __toESM(require_cjs(), 1);
|
|
9970
9982
|
var import_operators8 = __toESM(require_operators(), 1);
|
|
@@ -12441,30 +12453,25 @@ async function startMakeMeaning(project, config, eventBus, logger) {
|
|
|
12441
12453
|
resolveActorInference(config, "matcher"),
|
|
12442
12454
|
logger.child({ component: "inference-client-matcher" })
|
|
12443
12455
|
);
|
|
12444
|
-
const
|
|
12445
|
-
|
|
12446
|
-
|
|
12447
|
-
);
|
|
12456
|
+
const detectionInferenceCfg = resolveWorkerInference(config, "reference-annotation");
|
|
12457
|
+
const detectionInferenceClient = createInferenceClient(detectionInferenceCfg, logger.child({ component: "inference-client-reference-annotation" }));
|
|
12458
|
+
const detectionGenerator = inferenceConfigToGenerator("Reference Worker", detectionInferenceCfg);
|
|
12448
12459
|
const generationInferenceClient = createInferenceClient(
|
|
12449
12460
|
resolveWorkerInference(config, "generation"),
|
|
12450
12461
|
logger.child({ component: "inference-client-generation" })
|
|
12451
12462
|
);
|
|
12452
|
-
const
|
|
12453
|
-
|
|
12454
|
-
|
|
12455
|
-
);
|
|
12456
|
-
const assessmentInferenceClient = createInferenceClient(
|
|
12457
|
-
|
|
12458
|
-
|
|
12459
|
-
);
|
|
12460
|
-
const
|
|
12461
|
-
|
|
12462
|
-
|
|
12463
|
-
);
|
|
12464
|
-
const tagInferenceClient = createInferenceClient(
|
|
12465
|
-
resolveWorkerInference(config, "tag-annotation"),
|
|
12466
|
-
logger.child({ component: "inference-client-tag-annotation" })
|
|
12467
|
-
);
|
|
12463
|
+
const highlightInferenceCfg = resolveWorkerInference(config, "highlight-annotation");
|
|
12464
|
+
const highlightInferenceClient = createInferenceClient(highlightInferenceCfg, logger.child({ component: "inference-client-highlight-annotation" }));
|
|
12465
|
+
const highlightGenerator = inferenceConfigToGenerator("Highlight Worker", highlightInferenceCfg);
|
|
12466
|
+
const assessmentInferenceCfg = resolveWorkerInference(config, "assessment-annotation");
|
|
12467
|
+
const assessmentInferenceClient = createInferenceClient(assessmentInferenceCfg, logger.child({ component: "inference-client-assessment-annotation" }));
|
|
12468
|
+
const assessmentGenerator = inferenceConfigToGenerator("Assessment Worker", assessmentInferenceCfg);
|
|
12469
|
+
const commentInferenceCfg = resolveWorkerInference(config, "comment-annotation");
|
|
12470
|
+
const commentInferenceClient = createInferenceClient(commentInferenceCfg, logger.child({ component: "inference-client-comment-annotation" }));
|
|
12471
|
+
const commentGenerator = inferenceConfigToGenerator("Comment Worker", commentInferenceCfg);
|
|
12472
|
+
const tagInferenceCfg = resolveWorkerInference(config, "tag-annotation");
|
|
12473
|
+
const tagInferenceClient = createInferenceClient(tagInferenceCfg, logger.child({ component: "inference-client-tag-annotation" }));
|
|
12474
|
+
const tagGenerator = inferenceConfigToGenerator("Tag Worker", tagInferenceCfg);
|
|
12468
12475
|
const graphDb = await getGraphDatabase(graphConfig);
|
|
12469
12476
|
const kb = createKnowledgeBase(eventStore, project, graphDb, logger);
|
|
12470
12477
|
const graphConsumerLogger = logger.child({ component: "graph-consumer" });
|
|
@@ -12500,12 +12507,12 @@ async function startMakeMeaning(project, config, eventBus, logger) {
|
|
|
12500
12507
|
const commentLogger = logger.child({ component: "comment-detection-worker" });
|
|
12501
12508
|
const tagLogger = logger.child({ component: "tag-detection-worker" });
|
|
12502
12509
|
const workers = {
|
|
12503
|
-
detection: new ReferenceAnnotationWorker(jobQueue, detectionInferenceClient, eventBus, contentFetcher, detectionLogger),
|
|
12510
|
+
detection: new ReferenceAnnotationWorker(jobQueue, detectionInferenceClient, detectionGenerator, eventBus, contentFetcher, detectionLogger),
|
|
12504
12511
|
generation: new GenerationWorker(jobQueue, generationInferenceClient, eventBus, generationLogger),
|
|
12505
|
-
highlight: new HighlightAnnotationWorker(jobQueue, highlightInferenceClient, eventBus, contentFetcher, highlightLogger),
|
|
12506
|
-
assessment: new AssessmentAnnotationWorker(jobQueue, assessmentInferenceClient, eventBus, contentFetcher, assessmentLogger),
|
|
12507
|
-
comment: new CommentAnnotationWorker(jobQueue, commentInferenceClient, eventBus, contentFetcher, commentLogger),
|
|
12508
|
-
tag: new TagAnnotationWorker(jobQueue, tagInferenceClient, eventBus, contentFetcher, tagLogger)
|
|
12512
|
+
highlight: new HighlightAnnotationWorker(jobQueue, highlightInferenceClient, highlightGenerator, eventBus, contentFetcher, highlightLogger),
|
|
12513
|
+
assessment: new AssessmentAnnotationWorker(jobQueue, assessmentInferenceClient, assessmentGenerator, eventBus, contentFetcher, assessmentLogger),
|
|
12514
|
+
comment: new CommentAnnotationWorker(jobQueue, commentInferenceClient, commentGenerator, eventBus, contentFetcher, commentLogger),
|
|
12515
|
+
tag: new TagAnnotationWorker(jobQueue, tagInferenceClient, tagGenerator, eventBus, contentFetcher, tagLogger)
|
|
12509
12516
|
};
|
|
12510
12517
|
workers.detection.start().catch((error) => {
|
|
12511
12518
|
detectionLogger.error("Worker stopped unexpectedly", { error });
|