@semiont/make-meaning 0.2.35-build.99 → 0.2.36

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.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { JobWorker, JobQueue, AnyJob, DetectionResult, RunningJob, DetectionParams, DetectionProgress, GenerationResult, GenerationParams, GenerationProgress, HighlightDetectionResult, HighlightDetectionParams, HighlightDetectionProgress, AssessmentDetectionResult, AssessmentDetectionParams, AssessmentDetectionProgress, CommentDetectionResult, CommentDetectionParams, CommentDetectionProgress, TagDetectionResult, TagDetectionParams, TagDetectionProgress } from '@semiont/jobs';
1
+ import { JobWorker, JobQueue, AnyJob, DetectionResult, RunningJob, DetectionParams, DetectionProgress, GenerationResult, GenerationParams, YieldProgress, HighlightDetectionResult, HighlightDetectionParams, HighlightDetectionProgress, AssessmentDetectionResult, AssessmentDetectionParams, AssessmentDetectionProgress, CommentDetectionResult, CommentDetectionParams, CommentDetectionProgress, TagDetectionResult, TagDetectionParams, TagDetectionProgress } from '@semiont/jobs';
2
2
  import { EventStore } from '@semiont/event-sourcing';
3
3
  import { RepresentationStore } from '@semiont/content';
4
- import { EnvironmentConfig, EventBus, Logger, components, StoredEvent, ResourceId, CreationMethod, UserId, AnnotationUri, ResourceAnnotations, AnnotationId, AnnotationCategory, GraphPath, GraphConnection, GenerationContext } from '@semiont/core';
4
+ import { EnvironmentConfig, EventBus, Logger, components, StoredEvent, ResourceId, CreationMethod, UserId, AnnotationUri, ResourceAnnotations, AnnotationId, AnnotationCategory, GraphPath, GraphConnection, YieldContext } from '@semiont/core';
5
5
  import { InferenceClient } from '@semiont/inference';
6
6
  import { GraphDatabase } from '@semiont/graph';
7
7
 
@@ -80,7 +80,7 @@ declare class GenerationWorker extends JobWorker {
80
80
  * Emit completion event with result data
81
81
  * Override base class to emit job.completed event with resultResourceId
82
82
  */
83
- protected emitCompletionEvent(job: RunningJob<GenerationParams, GenerationProgress>, result: GenerationResult): Promise<void>;
83
+ protected emitCompletionEvent(job: RunningJob<GenerationParams, YieldProgress>, result: GenerationResult): Promise<void>;
84
84
  protected handleJobFailure(job: AnyJob, error: any): Promise<void>;
85
85
  /**
86
86
  * Update job progress and emit events to Event Store
@@ -935,7 +935,7 @@ declare function extractEntities(exact: string, entityTypes: string[] | {
935
935
  /**
936
936
  * Generate resource content using inference
937
937
  */
938
- declare function generateResourceFromTopic(topic: string, entityTypes: string[], client: InferenceClient, userPrompt?: string, locale?: string, context?: GenerationContext, temperature?: number, maxTokens?: number, logger?: Logger): Promise<{
938
+ declare function generateResourceFromTopic(topic: string, entityTypes: string[], client: InferenceClient, userPrompt?: string, locale?: string, context?: YieldContext, temperature?: number, maxTokens?: number, logger?: Logger): Promise<{
939
939
  title: string;
940
940
  content: string;
941
941
  }>;
package/dist/index.js CHANGED
@@ -510,11 +510,11 @@ var ReferenceAnnotationWorker = class extends JobWorker {
510
510
  totalSteps: detJob.params.entityTypes.length
511
511
  }
512
512
  });
513
- this.logger?.debug("[EventBus] Emitting initial annotate:progress", {
513
+ this.logger?.debug("[EventBus] Emitting initial mark:progress", {
514
514
  resourceId: detJob.params.resourceId,
515
515
  currentEntityType: detJob.progress.currentEntityType
516
516
  });
517
- resourceBus.get("annotate:progress").next({
517
+ resourceBus.get("mark:progress").next({
518
518
  status: "started",
519
519
  message: detJob.progress.currentEntityType ? `Starting ${detJob.progress.currentEntityType}...` : "Starting detection...",
520
520
  currentEntityType: detJob.progress.currentEntityType,
@@ -522,11 +522,11 @@ var ReferenceAnnotationWorker = class extends JobWorker {
522
522
  });
523
523
  } else if (isBeforeProcessing) {
524
524
  const percentage = 0;
525
- this.logger?.debug("[EventBus] Emitting annotate:progress (before processing)", {
525
+ this.logger?.debug("[EventBus] Emitting mark:progress (before processing)", {
526
526
  resourceId: detJob.params.resourceId,
527
527
  currentEntityType: detJob.progress.currentEntityType
528
528
  });
529
- resourceBus.get("annotate:progress").next({
529
+ resourceBus.get("mark:progress").next({
530
530
  status: "scanning",
531
531
  message: `Starting ${detJob.progress.currentEntityType}...`,
532
532
  currentEntityType: detJob.progress.currentEntityType,
@@ -547,12 +547,12 @@ var ReferenceAnnotationWorker = class extends JobWorker {
547
547
  foundCount: detJob.progress.entitiesFound
548
548
  }
549
549
  });
550
- this.logger?.debug("[EventBus] Emitting annotate:progress", {
550
+ this.logger?.debug("[EventBus] Emitting mark:progress", {
551
551
  resourceId: detJob.params.resourceId,
552
552
  currentEntityType: detJob.progress.currentEntityType,
553
553
  percentage
554
554
  });
555
- resourceBus.get("annotate:progress").next({
555
+ resourceBus.get("mark:progress").next({
556
556
  status: "scanning",
557
557
  message: `Processing ${detJob.progress.currentEntityType}`,
558
558
  currentEntityType: detJob.progress.currentEntityType,
@@ -964,7 +964,7 @@ var GenerationWorker = class extends JobWorker2 {
964
964
  message: genJob.progress.message
965
965
  }
966
966
  });
967
- resourceBus.get("generate:progress").next({
967
+ resourceBus.get("yield:progress").next({
968
968
  status: genJob.progress.stage,
969
969
  referenceId: genJob.params.referenceId,
970
970
  sourceResourceId: genJob.params.sourceResourceId,
@@ -1058,7 +1058,7 @@ var HighlightAnnotationWorker = class extends JobWorker3 {
1058
1058
  progress: hlJob.progress
1059
1059
  }
1060
1060
  });
1061
- resourceBus.get("annotate:progress").next({
1061
+ resourceBus.get("mark:progress").next({
1062
1062
  status: hlJob.progress.stage,
1063
1063
  message: hlJob.progress.message,
1064
1064
  percentage: hlJob.progress.percentage
@@ -1275,7 +1275,7 @@ var AssessmentAnnotationWorker = class extends JobWorker4 {
1275
1275
  progress: assJob.progress
1276
1276
  }
1277
1277
  });
1278
- resourceBus.get("annotate:progress").next({
1278
+ resourceBus.get("mark:progress").next({
1279
1279
  status: assJob.progress.stage,
1280
1280
  message: assJob.progress.message,
1281
1281
  percentage: assJob.progress.percentage
@@ -1496,7 +1496,7 @@ var CommentAnnotationWorker = class extends JobWorker5 {
1496
1496
  progress: cdJob.progress
1497
1497
  }
1498
1498
  });
1499
- resourceBus.get("annotate:progress").next({
1499
+ resourceBus.get("mark:progress").next({
1500
1500
  status: cdJob.progress.stage,
1501
1501
  message: cdJob.progress.message,
1502
1502
  percentage: cdJob.progress.percentage
@@ -1728,7 +1728,7 @@ var TagAnnotationWorker = class extends JobWorker6 {
1728
1728
  progress: tdJob.progress
1729
1729
  }
1730
1730
  });
1731
- resourceBus.get("annotate:progress").next({
1731
+ resourceBus.get("mark:progress").next({
1732
1732
  status: tdJob.progress.stage,
1733
1733
  message: tdJob.progress.message,
1734
1734
  percentage: tdJob.progress.percentage,