@semiont/jobs 0.5.37 → 0.5.38
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 +18 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/worker-main.js.map +1 -1
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -363,6 +363,15 @@ interface JobQueue {
|
|
|
363
363
|
cancelled: number;
|
|
364
364
|
}>;
|
|
365
365
|
}
|
|
366
|
+
/**
|
|
367
|
+
* Every bus channel a queue DRIVER emits, maintained beside the interface
|
|
368
|
+
* both drivers implement and censused against their sources
|
|
369
|
+
* (queue-emits-census.test.ts). The gateway's signal bridge forwards these
|
|
370
|
+
* from its local bus onto the plane — a queue announcement that stays on
|
|
371
|
+
* the raw bus reaches no worker under a remote driver (the job:queued
|
|
372
|
+
* starvation, 2026-09-15).
|
|
373
|
+
*/
|
|
374
|
+
declare const JOB_QUEUE_EMITS: readonly ["job:queued"];
|
|
366
375
|
|
|
367
376
|
/**
|
|
368
377
|
* Job Queue Manager
|
|
@@ -546,6 +555,14 @@ declare class FsJobQueue implements JobQueue {
|
|
|
546
555
|
* handle escapes this file.
|
|
547
556
|
*/
|
|
548
557
|
|
|
558
|
+
/**
|
|
559
|
+
* The JOBS stream's capture filter — exported as the ONE home of the fact.
|
|
560
|
+
* A JetStream stream is a server-side subscription: anything published under
|
|
561
|
+
* these subjects is persisted regardless of which client API produced it.
|
|
562
|
+
* The signal plane's disjointness gate derives from this export instead of
|
|
563
|
+
* restating it (SIGNAL-PLANE D3 gate 3).
|
|
564
|
+
*/
|
|
565
|
+
declare const JOBS_STREAM_SUBJECTS: readonly ["jobs.>"];
|
|
549
566
|
interface JetStreamJobQueueOptions {
|
|
550
567
|
/** NATS server address(es), e.g. "192.168.64.42:4222". */
|
|
551
568
|
servers: string | string[];
|
|
@@ -1030,5 +1047,5 @@ declare function generateResourceFromTopic(topic: string, entityTypes: string[],
|
|
|
1030
1047
|
*/
|
|
1031
1048
|
declare const STALL_THRESHOLD_MS: number;
|
|
1032
1049
|
|
|
1033
|
-
export { AnnotationDetection, FsJobQueue, JetStreamJobQueue, STALL_THRESHOLD_MS, generateResourceFromTopic, isCancelledJob, isCompleteJob, isFailedJob, isPendingJob, isRunningJob, processAssessmentJob, processCommentJob, processGenerationJob, processHighlightJob, processReferenceJob, processTagJob };
|
|
1050
|
+
export { AnnotationDetection, FsJobQueue, JOBS_STREAM_SUBJECTS, JOB_QUEUE_EMITS, JetStreamJobQueue, STALL_THRESHOLD_MS, generateResourceFromTopic, isCancelledJob, isCompleteJob, isFailedJob, isPendingJob, isRunningJob, processAssessmentJob, processCommentJob, processGenerationJob, processHighlightJob, processReferenceJob, processTagJob };
|
|
1034
1051
|
export type { AnyJob, AssessmentDetectionJob, AssessmentDetectionParams, AssessmentDetectionProgress, CancelledJob, CommentDetectionJob, CommentDetectionParams, CommentDetectionProgress, CompleteJob, DetectionJob, DetectionParams, DetectionProgress, FailedJob, GenerationJob, GenerationResult, HighlightDetectionJob, HighlightDetectionParams, HighlightDetectionProgress, JetStreamJobQueueOptions, JobMetadata, JobQueryFilters, JobQueue, JobStatus, JobType, OnProgress, PendingJob, ProcessorResult, RunningJob, TagDetectionJob, TagDetectionParams, TagDetectionProgress, YieldProgress };
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,8 @@ import '@semiont/event-sourcing';
|
|
|
12
12
|
import '@semiont/sdk';
|
|
13
13
|
import '@semiont/http-transport';
|
|
14
14
|
|
|
15
|
-
// src/
|
|
15
|
+
// src/job-queue-interface.ts
|
|
16
|
+
var JOB_QUEUE_EMITS = ["job:queued"];
|
|
16
17
|
|
|
17
18
|
// src/will-retry.ts
|
|
18
19
|
function willRetryAfter(metadata, failureClass) {
|
|
@@ -517,6 +518,7 @@ var PROGRESS_WRITE_MIN_INTERVAL_MS2 = 5e3;
|
|
|
517
518
|
var MAX_CAS_ATTEMPTS = 20;
|
|
518
519
|
var enc = new TextEncoder();
|
|
519
520
|
var dec = new TextDecoder();
|
|
521
|
+
var JOBS_STREAM_SUBJECTS = ["jobs.>"];
|
|
520
522
|
function categoryOf(type) {
|
|
521
523
|
return type === "generation" ? "generation" : "annotation";
|
|
522
524
|
}
|
|
@@ -565,7 +567,7 @@ var JetStreamJobQueue = class {
|
|
|
565
567
|
} catch {
|
|
566
568
|
await this.jsm.streams.add({
|
|
567
569
|
name: STREAM,
|
|
568
|
-
subjects: [
|
|
570
|
+
subjects: [...JOBS_STREAM_SUBJECTS],
|
|
569
571
|
retention: RetentionPolicy.Workqueue
|
|
570
572
|
});
|
|
571
573
|
}
|
|
@@ -2935,6 +2937,6 @@ var WORKER_AWAITED_OPERATIONS = [
|
|
|
2935
2937
|
];
|
|
2936
2938
|
replyChannelsFor(WORKER_AWAITED_OPERATIONS);
|
|
2937
2939
|
|
|
2938
|
-
export { AnnotationDetection, FsJobQueue, JetStreamJobQueue, STALL_THRESHOLD_MS, generateResourceFromTopic, isCancelledJob, isCompleteJob, isFailedJob, isPendingJob, isRunningJob, processAssessmentJob, processCommentJob, processGenerationJob, processHighlightJob, processReferenceJob, processTagJob };
|
|
2940
|
+
export { AnnotationDetection, FsJobQueue, JOBS_STREAM_SUBJECTS, JOB_QUEUE_EMITS, JetStreamJobQueue, STALL_THRESHOLD_MS, generateResourceFromTopic, isCancelledJob, isCompleteJob, isFailedJob, isPendingJob, isRunningJob, processAssessmentJob, processCommentJob, processGenerationJob, processHighlightJob, processReferenceJob, processTagJob };
|
|
2939
2941
|
//# sourceMappingURL=index.js.map
|
|
2940
2942
|
//# sourceMappingURL=index.js.map
|