@semiont/jobs 0.5.4 → 0.5.5

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.
Files changed (33) hide show
  1. package/dist/index.d.ts +644 -20
  2. package/dist/worker-main.d.ts +2 -22
  3. package/dist/worker-main.js +1197 -1197
  4. package/dist/worker-main.js.map +1 -1
  5. package/package.json +4 -2
  6. package/dist/fs-job-queue.d.ts +0 -79
  7. package/dist/fs-job-queue.d.ts.map +0 -1
  8. package/dist/index.d.ts.map +0 -1
  9. package/dist/job-claim-adapter.d.ts +0 -76
  10. package/dist/job-claim-adapter.d.ts.map +0 -1
  11. package/dist/job-queue-interface.d.ts +0 -19
  12. package/dist/job-queue-interface.d.ts.map +0 -1
  13. package/dist/job-queue-state-unit.d.ts +0 -26
  14. package/dist/job-queue-state-unit.d.ts.map +0 -1
  15. package/dist/job-worker.d.ts +0 -67
  16. package/dist/job-worker.d.ts.map +0 -1
  17. package/dist/processors.d.ts +0 -41
  18. package/dist/processors.d.ts.map +0 -1
  19. package/dist/types.d.ts +0 -319
  20. package/dist/types.d.ts.map +0 -1
  21. package/dist/worker-main.d.ts.map +0 -1
  22. package/dist/worker-process.d.ts +0 -47
  23. package/dist/worker-process.d.ts.map +0 -1
  24. package/dist/workers/annotation-detection.d.ts +0 -61
  25. package/dist/workers/annotation-detection.d.ts.map +0 -1
  26. package/dist/workers/detection/entity-extractor.d.ts +0 -42
  27. package/dist/workers/detection/entity-extractor.d.ts.map +0 -1
  28. package/dist/workers/detection/motivation-parsers.d.ts +0 -116
  29. package/dist/workers/detection/motivation-parsers.d.ts.map +0 -1
  30. package/dist/workers/detection/motivation-prompts.d.ts +0 -57
  31. package/dist/workers/detection/motivation-prompts.d.ts.map +0 -1
  32. package/dist/workers/generation/resource-generation.d.ts +0 -23
  33. package/dist/workers/generation/resource-generation.d.ts.map +0 -1
@@ -1,57 +0,0 @@
1
- /**
2
- * Prompt builders for annotation detection motivations
3
- *
4
- * Provides static methods to build AI prompts for each Web Annotation motivation type.
5
- * Extracted from worker implementations to centralize prompt logic.
6
- *
7
- * Locale handling: builders take two optional BCP-47 tags. `language` is the
8
- * locale the *generated body text* should be written in (sourced from the user's
9
- * UI locale); `sourceLanguage` is the locale of the *text being analyzed*
10
- * (sourced from `ResourceDescriptor` / its primary representation). They are
11
- * independent — see `types.ts` "Locale conventions" for the full discussion.
12
- */
13
- export declare class MotivationPrompts {
14
- /**
15
- * Build a prompt for detecting comment-worthy passages
16
- *
17
- * @param content - The text content to analyze (will be truncated to 8000 chars)
18
- * @param instructions - Optional user-provided instructions
19
- * @param tone - Optional tone guidance (e.g., "academic", "conversational")
20
- * @param density - Optional target number of comments per 2000 words
21
- * @returns Formatted prompt string
22
- */
23
- static buildCommentPrompt(content: string, instructions?: string, tone?: string, density?: number, language?: string, sourceLanguage?: string): string;
24
- /**
25
- * Build a prompt for detecting highlight-worthy passages
26
- *
27
- * @param content - The text content to analyze (will be truncated to 8000 chars)
28
- * @param instructions - Optional user-provided instructions
29
- * @param density - Optional target number of highlights per 2000 words
30
- * @returns Formatted prompt string
31
- */
32
- static buildHighlightPrompt(content: string, instructions?: string, density?: number, sourceLanguage?: string): string;
33
- /**
34
- * Build a prompt for detecting assessment-worthy passages
35
- *
36
- * @param content - The text content to analyze (will be truncated to 8000 chars)
37
- * @param instructions - Optional user-provided instructions
38
- * @param tone - Optional tone guidance (e.g., "critical", "supportive")
39
- * @param density - Optional target number of assessments per 2000 words
40
- * @returns Formatted prompt string
41
- */
42
- static buildAssessmentPrompt(content: string, instructions?: string, tone?: string, density?: number, language?: string, sourceLanguage?: string): string;
43
- /**
44
- * Build a prompt for detecting structural tags
45
- *
46
- * @param content - The full text content to analyze (NOT truncated for structural analysis)
47
- * @param category - The specific category to detect
48
- * @param schemaName - Human-readable schema name
49
- * @param schemaDescription - Schema description
50
- * @param schemaDomain - Schema domain
51
- * @param categoryDescription - Category description
52
- * @param categoryExamples - Example questions/guidance for this category
53
- * @returns Formatted prompt string
54
- */
55
- static buildTagPrompt(content: string, category: string, schemaName: string, schemaDescription: string, schemaDomain: string, categoryDescription: string, categoryExamples: string[], sourceLanguage?: string): string;
56
- }
57
- //# sourceMappingURL=motivation-prompts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"motivation-prompts.d.ts","sourceRoot":"","sources":["../../../src/workers/detection/motivation-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAoBH,qBAAa,iBAAiB;IAC5B;;;;;;;;OAQG;IACH,MAAM,CAAC,kBAAkB,CACvB,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,EACrB,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,MAAM,GACtB,MAAM;IA8ET;;;;;;;OAOG;IACH,MAAM,CAAC,oBAAoB,CACzB,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,MAAM,EAChB,cAAc,CAAC,EAAE,MAAM,GACtB,MAAM;IAwET;;;;;;;;OAQG;IACH,MAAM,CAAC,qBAAqB,CAC1B,OAAO,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,EACrB,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,MAAM,GACtB,MAAM;IA8ET;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,cAAc,CACnB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,EAClB,iBAAiB,EAAE,MAAM,EACzB,YAAY,EAAE,MAAM,EACpB,mBAAmB,EAAE,MAAM,EAC3B,gBAAgB,EAAE,MAAM,EAAE,EAC1B,cAAc,CAAC,EAAE,MAAM,GACtB,MAAM;CAiDV"}
@@ -1,23 +0,0 @@
1
- /**
2
- * Resource Generation
3
- *
4
- * Generates markdown resources from topics using AI inference.
5
- */
6
- import type { GatheredContext, Logger } from '@semiont/core';
7
- import type { InferenceClient } from '@semiont/inference';
8
- /**
9
- * Generate resource content using inference.
10
- *
11
- * Locale parameters: `locale` is the *body* locale — the language the
12
- * generated resource should be written in (sourced from the user's UI
13
- * locale). `sourceLanguage` is the *source* locale — the language of the
14
- * referenced resource whose context (selected passage, surrounding text)
15
- * is embedded into the prompt. They're independent: a German user can
16
- * generate German content from an English source resource. See
17
- * `types.ts` "Locale conventions" for the full discussion.
18
- */
19
- export declare function generateResourceFromTopic(topic: string, entityTypes: string[], client: InferenceClient, logger: Logger, userPrompt?: string, locale?: string, context?: GatheredContext, temperature?: number, maxTokens?: number, sourceLanguage?: string): Promise<{
20
- title: string;
21
- content: string;
22
- }>;
23
- //# sourceMappingURL=resource-generation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resource-generation.d.ts","sourceRoot":"","sources":["../../../src/workers/generation/resource-generation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAO1D;;;;;;;;;;GAUG;AACH,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,EAAE,EACrB,MAAM,EAAE,eAAe,EACvB,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,eAAe,EACzB,WAAW,CAAC,EAAE,MAAM,EACpB,SAAS,CAAC,EAAE,MAAM,EAClB,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAyJ7C"}