@heripo/research-radar 6.4.0 → 6.4.2

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,83 +1,81 @@
1
- import { ArticleDeadline, UrlString, IsoDateString, ParsedTarget, CrawlingTargetGroup, CrawlingTarget, UnscoredArticle, ArticleForUpdateByAnalysis, ArticleForGenerateContent, Newsletter, AppLogger, EmailService, EmailMessage, PromptProvider, DateService as DateService$1, TaskService as TaskService$1, AnalysisProvider as AnalysisProvider$1, ContentGenerateProvider as ContentGenerateProvider$1, HtmlTemplate, CrawlingProvider as CrawlingProvider$1, GenerateNewsletterConfig, ExtractArticleDeadlinesConfig, ExtractArticleDeadlinesResult } from '@llm-newsletter-kit/core';
2
- import { LanguageModel, LanguageModelUsage } from 'ai';
3
- import { OpenAIProvider } from '@ai-sdk/openai';
4
-
1
+ import { AnalysisProvider as AnalysisProvider$1, AppLogger, ArticleDeadline, ArticleForGenerateContent, ArticleForUpdateByAnalysis, ContentGenerateProvider as ContentGenerateProvider$1, CrawlingProvider as CrawlingProvider$1, CrawlingTarget, CrawlingTargetGroup, DateService as DateService$1, EmailMessage, EmailService, ExtractArticleDeadlinesConfig, ExtractArticleDeadlinesResult, GenerateNewsletterConfig, HtmlTemplate, IsoDateString, Newsletter, ParsedTarget, PromptProvider, TaskService as TaskService$1, UnscoredArticle, UrlString } from "@llm-newsletter-kit/core";
2
+ import { LanguageModel, LanguageModelUsage } from "ai";
3
+ import { OpenAIProvider } from "@ai-sdk/openai";
5
4
  /** Host-selected, published action matched against a freshly verified source. */
6
5
  interface VerifiedDeadlineReminder {
7
- deadline: ArticleDeadline;
8
- url: UrlString;
9
- verificationStatus: 'verified';
10
- /**
11
- * Published issues in the past week that already listed this action.
12
- * Host-supplied history; it only informs the reminder selection prompt.
13
- */
14
- recentReminderCount?: number;
6
+ deadline: ArticleDeadline;
7
+ url: UrlString;
8
+ verificationStatus: 'verified';
9
+ /**
10
+ * Published issues in the past week that already listed this action.
11
+ * Host-supplied history; it only informs the reminder selection prompt.
12
+ */
13
+ recentReminderCount?: number;
15
14
  }
16
15
  /** Days before the date an action first becomes eligible (D-3 through D-day). */
17
- declare const DEADLINE_REMINDER_LEAD_DAYS = 3;
16
+ export declare const DEADLINE_REMINDER_LEAD_DAYS = 3;
18
17
  /** Rows the unified deadline section displays. */
19
- declare const DEADLINE_REMINDER_LIMIT = 10;
18
+ export declare const DEADLINE_REMINDER_LIMIT = 10;
20
19
  /** A reminder that passed every display guard, with its normalized link. */
21
20
  interface EligibleDeadlineReminder {
22
- reminder: VerifiedDeadlineReminder;
23
- /** Calendar days from publication to the start date; negative while ongoing. */
24
- days: number;
25
- url: string;
21
+ reminder: VerifiedDeadlineReminder;
22
+ /** Calendar days from publication to the start date; negative while ongoing. */
23
+ days: number;
24
+ url: string;
26
25
  }
27
26
  /** Deterministic deadlines/events, no LLM context: the first rows by date. */
28
- declare function renderVerifiedDeadlineReminders(reminders: VerifiedDeadlineReminder[], publicationDate: IsoDateString, now?: Date): string;
29
-
27
+ export declare function renderVerifiedDeadlineReminders(reminders: VerifiedDeadlineReminder[], publicationDate: IsoDateString, now?: Date): string;
30
28
  /**
31
29
  * Repository interface for task management
32
30
  */
33
31
  interface TaskRepository {
34
- /**
35
- * Create and save a new task
36
- * @returns Created task ID
37
- */
38
- createTask(): Promise<number>;
39
- /**
40
- * Complete a task
41
- * @param taskId Task ID to complete
42
- */
43
- completeTask(taskId: number): Promise<void>;
32
+ /**
33
+ * Create and save a new task
34
+ * @returns Created task ID
35
+ */
36
+ createTask(): Promise<number>;
37
+ /**
38
+ * Complete a task
39
+ * @param taskId Task ID to complete
40
+ */
41
+ completeTask(taskId: number): Promise<void>;
44
42
  }
45
43
  /**
46
44
  * Repository interface for article management
47
45
  */
48
46
  interface ArticleRepository {
49
- /**
50
- * Find existing articles by URLs
51
- * @param urls URLs to query
52
- * @returns Previously saved articles
53
- */
54
- findByUrls(urls: UrlString[]): Promise<ParsedTarget[]>;
55
- /**
56
- * Save crawled articles
57
- * @param articles Articles to save
58
- * @param context Task context information
59
- * @returns Number of saved articles
60
- */
61
- saveCrawledArticles<TaskId>(articles: ParsedTarget[], context: {
62
- taskId: TaskId;
63
- targetGroup: Omit<CrawlingTargetGroup, 'targets'>;
64
- target: CrawlingTarget;
65
- }): Promise<number>;
66
- /**
67
- * Find unscored articles (targets for analysis)
68
- * @returns Articles without scores
69
- */
70
- findUnscoredArticles(): Promise<UnscoredArticle[]>;
71
- /**
72
- * Update article with analysis results
73
- * @param article Article information to update
74
- */
75
- updateAnalysis(article: ArticleForUpdateByAnalysis): Promise<void>;
76
- /**
77
- * Find candidate articles for newsletter generation
78
- * @returns Candidate articles
79
- */
80
- findCandidatesForNewsletter(): Promise<ArticleForGenerateContent[]>;
47
+ /**
48
+ * Find existing articles by URLs
49
+ * @param urls URLs to query
50
+ * @returns Previously saved articles
51
+ */
52
+ findByUrls(urls: UrlString[]): Promise<ParsedTarget[]>;
53
+ /**
54
+ * Save crawled articles
55
+ * @param articles Articles to save
56
+ * @param context Task context information
57
+ * @returns Number of saved articles
58
+ */
59
+ saveCrawledArticles<TaskId>(articles: ParsedTarget[], context: {
60
+ taskId: TaskId;
61
+ targetGroup: Omit<CrawlingTargetGroup, 'targets'>;
62
+ target: CrawlingTarget;
63
+ }): Promise<number>;
64
+ /**
65
+ * Find unscored articles (targets for analysis)
66
+ * @returns Articles without scores
67
+ */
68
+ findUnscoredArticles(): Promise<UnscoredArticle[]>;
69
+ /**
70
+ * Update article with analysis results
71
+ * @param article Article information to update
72
+ */
73
+ updateAnalysis(article: ArticleForUpdateByAnalysis): Promise<void>;
74
+ /**
75
+ * Find candidate articles for newsletter generation
76
+ * @returns Candidate articles
77
+ */
78
+ findCandidatesForNewsletter(): Promise<ArticleForGenerateContent[]>;
81
79
  }
82
80
  /**
83
81
  * A single excavation report supplied by the application instead of crawled.
@@ -86,35 +84,35 @@ interface ArticleRepository {
86
84
  * that already stores these rows can hand them over without reshaping them.
87
85
  */
88
86
  interface ExcavationReport {
89
- /**
90
- * The board's own identifier (`ecexmRcno`). Used both as the article's unique
91
- * id and to build its public detail URL, so it must match the value the board
92
- * uses — otherwise previously crawled reports are re-saved as duplicates.
93
- * @example "202609157717"
94
- */
95
- externalId: string;
96
- /**
97
- * Report title (보고서명).
98
- * @example "태안 태안읍성 -남문지 및 연지-"
99
- */
100
- title: string;
101
- /**
102
- * Submission date (제출일) in ISO format (YYYY-MM-DD).
103
- * @example "2026-09-15"
104
- */
105
- submittedDate: IsoDateString;
106
- /**
107
- * Report detail fields as label/value pairs, rendered into the article body in
108
- * insertion order. Supply whatever the source holds — 허가번호, 유적명,
109
- * 발간기관, 조사시도시군구, 조사기간, 유적성격/시대구분 and so on.
110
- * Empty values are skipped.
111
- */
112
- fields: Record<string, string | null | undefined>;
113
- /**
114
- * Whether the report has a downloadable file. Defaults to true, matching the
115
- * crawled parser.
116
- */
117
- hasAttachedFile?: boolean;
87
+ /**
88
+ * The board's own identifier (`ecexmRcno`). Used both as the article's unique
89
+ * id and to build its public detail URL, so it must match the value the board
90
+ * uses — otherwise previously crawled reports are re-saved as duplicates.
91
+ * @example "202609157717"
92
+ */
93
+ externalId: string;
94
+ /**
95
+ * Report title (보고서명).
96
+ * @example "태안 태안읍성 -남문지 및 연지-"
97
+ */
98
+ title: string;
99
+ /**
100
+ * Submission date (제출일) in ISO format (YYYY-MM-DD).
101
+ * @example "2026-09-15"
102
+ */
103
+ submittedDate: IsoDateString;
104
+ /**
105
+ * Report detail fields as label/value pairs, rendered into the article body in
106
+ * insertion order. Supply whatever the source holds — 허가번호, 유적명,
107
+ * 발간기관, 조사시도시군구, 조사기간, 유적성격/시대구분 and so on.
108
+ * Empty values are skipped.
109
+ */
110
+ fields: Record<string, string | null | undefined>;
111
+ /**
112
+ * Whether the report has a downloadable file. Defaults to true, matching the
113
+ * crawled parser.
114
+ */
115
+ hasAttachedFile?: boolean;
118
116
  }
119
117
  /**
120
118
  * Supplies excavation reports from the application instead of crawling them.
@@ -130,19 +128,19 @@ type ExcavationReportSource = () => Promise<ExcavationReport[]>;
130
128
  * One paper in an injected journal issue.
131
129
  */
132
130
  interface JournalIssuePaper {
133
- /** Paper title. */
134
- title: string;
135
- /** Author names in publication order. */
136
- authors: string[];
137
- /** Author keywords. Blank and repeated keywords are ignored. */
138
- keywords: string[];
139
- /**
140
- * Abstract shown to the scoring and generation models, in the original
141
- * language when the source has one. Truncated before it reaches them.
142
- */
143
- abstract?: string | null;
144
- /** Public page for the paper, such as its KCI article page. */
145
- url: string;
131
+ /** Paper title. */
132
+ title: string;
133
+ /** Author names in publication order. */
134
+ authors: string[];
135
+ /** Author keywords. Blank and repeated keywords are ignored. */
136
+ keywords: string[];
137
+ /**
138
+ * Abstract shown to the scoring and generation models, in the original
139
+ * language when the source has one. Truncated before it reaches them.
140
+ */
141
+ abstract?: string | null;
142
+ /** Public page for the paper, such as its KCI article page. */
143
+ url: string;
146
144
  }
147
145
  /**
148
146
  * A newly published journal issue (권호) supplied by the application.
@@ -151,42 +149,42 @@ interface JournalIssuePaper {
151
149
  * twenty-paper issue is scored and introduced once rather than twenty times.
152
150
  */
153
151
  interface JournalIssue {
154
- /**
155
- * Stable identifier for the issue, such as
156
- * `{journalId}|{year}|{month}|{volume}|{issue}`. It becomes the article's
157
- * `uniqId` and reaches `saveCrawledArticles`, so the application can store
158
- * it with the article. `usedArticles` carry only the article's own id and
159
- * URL, so that stored value (or the issue `url`) is how the application maps
160
- * a saved newsletter back to the issues it introduced. Keep it independent
161
- * of the paper list, or a later snapshot of the same issue looks like a new
162
- * one.
163
- */
164
- externalId: string;
165
- /**
166
- * Public page readers follow from the newsletter. It is also the article's
167
- * URL, so it must be stable for the issue: previously saved issues are
168
- * recognized by it and not saved again.
169
- */
170
- url: string;
171
- /** Journal name, e.g. "헤리티지:역사와 과학". */
172
- journalName: string;
173
- /** Publication year. */
174
- publishedYear: number;
175
- /** Publication month, 1-12. */
176
- publishedMonth: number;
177
- /** Volume (권). Empty when the journal numbers issues only. */
178
- volume: string;
179
- /** Issue number (호). Empty when the journal numbers volumes only. */
180
- issue: string;
181
- /**
182
- * Date the issue became available to the application, in ISO format
183
- * (YYYY-MM-DD, Korean time) — for example when its papers were first
184
- * collected. Used as the article's registered date.
185
- * @example "2026-10-28"
186
- */
187
- registeredDate: IsoDateString;
188
- /** Every paper in the issue, in the order to list them. */
189
- papers: JournalIssuePaper[];
152
+ /**
153
+ * Stable identifier for the issue, such as
154
+ * `{journalId}|{year}|{month}|{volume}|{issue}`. It becomes the article's
155
+ * `uniqId` and reaches `saveCrawledArticles`, so the application can store
156
+ * it with the article. `usedArticles` carry only the article's own id and
157
+ * URL, so that stored value (or the issue `url`) is how the application maps
158
+ * a saved newsletter back to the issues it introduced. Keep it independent
159
+ * of the paper list, or a later snapshot of the same issue looks like a new
160
+ * one.
161
+ */
162
+ externalId: string;
163
+ /**
164
+ * Public page readers follow from the newsletter. It is also the article's
165
+ * URL, so it must be stable for the issue: previously saved issues are
166
+ * recognized by it and not saved again.
167
+ */
168
+ url: string;
169
+ /** Journal name, e.g. "헤리티지:역사와 과학". */
170
+ journalName: string;
171
+ /** Publication year. */
172
+ publishedYear: number;
173
+ /** Publication month, 1-12. */
174
+ publishedMonth: number;
175
+ /** Volume (권). Empty when the journal numbers issues only. */
176
+ volume: string;
177
+ /** Issue number (호). Empty when the journal numbers volumes only. */
178
+ issue: string;
179
+ /**
180
+ * Date the issue became available to the application, in ISO format
181
+ * (YYYY-MM-DD, Korean time) — for example when its papers were first
182
+ * collected. Used as the article's registered date.
183
+ * @example "2026-10-28"
184
+ */
185
+ registeredDate: IsoDateString;
186
+ /** Every paper in the issue, in the order to list them. */
187
+ papers: JournalIssuePaper[];
190
188
  }
191
189
  /**
192
190
  * Supplies newly published journal issues from the application, such as those
@@ -208,27 +206,27 @@ type JournalIssueSource = () => Promise<JournalIssue[]>;
208
206
  * introduced. A run that saves no newsletter consumes none of them.
209
207
  */
210
208
  interface SubmittedPaper {
211
- /**
212
- * Stable identifier from the application. It comes back unchanged in
213
- * `saveNewsletter`'s `submittedPapers`, which is how the application records
214
- * that the paper was introduced.
215
- */
216
- id: string;
217
- /** Paper title. */
218
- title: string;
219
- /** Author names in publication order. */
220
- authors: string[];
221
- /**
222
- * Where the paper appeared: the journal for a journal paper, the university
223
- * for a thesis.
224
- * @example "고려대학교"
225
- */
226
- venue: string;
227
- /**
228
- * Page where readers can see the paper or its record. Only http(s) URLs are
229
- * linked; anything else renders the title without a link.
230
- */
231
- url: string;
209
+ /**
210
+ * Stable identifier from the application. It comes back unchanged in
211
+ * `saveNewsletter`'s `submittedPapers`, which is how the application records
212
+ * that the paper was introduced.
213
+ */
214
+ id: string;
215
+ /** Paper title. */
216
+ title: string;
217
+ /** Author names in publication order. */
218
+ authors: string[];
219
+ /**
220
+ * Where the paper appeared: the journal for a journal paper, the university
221
+ * for a thesis.
222
+ * @example "고려대학교"
223
+ */
224
+ venue: string;
225
+ /**
226
+ * Page where readers can see the paper or its record. Only http(s) URLs are
227
+ * linked; anything else renders the title without a link.
228
+ */
229
+ url: string;
232
230
  }
233
231
  /**
234
232
  * Supplies the submitted papers to introduce in this run. Called at most once,
@@ -240,54 +238,54 @@ type SubmittedPaperSource = () => Promise<SubmittedPaper[]>;
240
238
  * Repository interface for tag management
241
239
  */
242
240
  interface TagRepository {
243
- /**
244
- * Find all existing tags
245
- * @returns Tag name list
246
- */
247
- findAllTags(): Promise<string[]>;
241
+ /**
242
+ * Find all existing tags
243
+ * @returns Tag name list
244
+ */
245
+ findAllTags(): Promise<string[]>;
248
246
  }
249
247
  /**
250
248
  * Base template options shared by all newsletter variants.
251
249
  */
252
250
  interface BaseNewsletterTemplateOptions {
253
- /**
254
- * Deterministic reminder section from renderVerifiedDeadlineReminders().
255
- * Appended to saved Markdown and HTML after generation; never fed to the LLM.
256
- */
257
- deadlineRemindersMarkdown?: string;
258
- /** Freshly verified historical deadlines/events, merged with included articles. */
259
- verifiedDeadlineReminders?: VerifiedDeadlineReminder[];
260
- /**
261
- * Custom colleague-sharing Markdown, placed after the unified deadline section
262
- * in both saved Markdown and HTML. Omit for the default; use '' to suppress it.
263
- */
264
- shareNoticeMarkdown?: string;
265
- /**
266
- * Markdown content for KRAS news section.
267
- * Converted to HTML and injected into the newsletter template.
268
- */
269
- krasNewsMarkdown?: string;
270
- /**
271
- * Markdown content for KRAS notice section.
272
- * Converted to HTML and injected into the newsletter template.
273
- */
274
- krasNoticeMarkdown?: string;
275
- /**
276
- * Markdown content for heripo lab news section.
277
- * Converted to HTML and injected into the newsletter template.
278
- */
279
- heripolabNewsMarkdown?: string;
280
- /**
281
- * Display date string for the newsletter header (e.g. "2026년 2월 12일").
282
- * Injected from DateService.getPublicationDisplayDateString() at generation time.
283
- */
284
- displayDate?: string;
251
+ /**
252
+ * Deterministic reminder section from renderVerifiedDeadlineReminders().
253
+ * Appended to saved Markdown and HTML after generation; never fed to the LLM.
254
+ */
255
+ deadlineRemindersMarkdown?: string;
256
+ /** Freshly verified historical deadlines/events, merged with included articles. */
257
+ verifiedDeadlineReminders?: VerifiedDeadlineReminder[];
258
+ /**
259
+ * Custom colleague-sharing Markdown, placed after the unified deadline section
260
+ * in both saved Markdown and HTML. Omit for the default; use '' to suppress it.
261
+ */
262
+ shareNoticeMarkdown?: string;
263
+ /**
264
+ * Markdown content for KRAS news section.
265
+ * Converted to HTML and injected into the newsletter template.
266
+ */
267
+ krasNewsMarkdown?: string;
268
+ /**
269
+ * Markdown content for KRAS notice section.
270
+ * Converted to HTML and injected into the newsletter template.
271
+ */
272
+ krasNoticeMarkdown?: string;
273
+ /**
274
+ * Markdown content for heripo lab news section.
275
+ * Converted to HTML and injected into the newsletter template.
276
+ */
277
+ heripolabNewsMarkdown?: string;
278
+ /**
279
+ * Display date string for the newsletter header (e.g. "2026년 2월 12일").
280
+ * Injected from DateService.getPublicationDisplayDateString() at generation time.
281
+ */
282
+ displayDate?: string;
285
283
  }
286
284
  /**
287
285
  * Template options for the default (heripo) newsletter variant.
288
286
  */
289
287
  interface DefaultNewsletterTemplateOptions extends BaseNewsletterTemplateOptions {
290
- isKrasNewsletter?: false;
288
+ isKrasNewsletter?: false;
291
289
  }
292
290
  /**
293
291
  * Template options for the KRAS (Korean Archaeological Society) newsletter variant.
@@ -296,14 +294,14 @@ interface DefaultNewsletterTemplateOptions extends BaseNewsletterTemplateOptions
296
294
  * - titleContext: Context string to prioritize in newsletter title generation
297
295
  */
298
296
  interface KrasNewsletterTemplateOptions extends BaseNewsletterTemplateOptions {
299
- isKrasNewsletter: true;
300
- /**
301
- * Context string to prioritize when generating the newsletter title.
302
- * Only available in KRAS mode. When provided, the LLM will consider this value
303
- * as the top priority along with the generated newsletter content for title creation.
304
- * An empty string is treated as undefined (no context).
305
- */
306
- titleContext?: string;
297
+ isKrasNewsletter: true;
298
+ /**
299
+ * Context string to prioritize when generating the newsletter title.
300
+ * Only available in KRAS mode. When provided, the LLM will consider this value
301
+ * as the top priority along with the generated newsletter content for title creation.
302
+ * An empty string is treated as undefined (no context).
303
+ */
304
+ titleContext?: string;
307
305
  }
308
306
  /**
309
307
  * Template customization options for newsletter HTML generation.
@@ -320,45 +318,45 @@ type NewsletterTemplateOptions = DefaultNewsletterTemplateOptions | KrasNewslett
320
318
  * When `isKrasNewsletter` is `false` or omitted, standard heripo branding is used.
321
319
  */
322
320
  interface WelcomeTemplateOptions {
323
- /** When true, apply KRAS (Korean Archaeological Society) branding */
324
- isKrasNewsletter?: boolean;
325
- /** Site base URL for constructing links (default: 'https://heripo.app') */
326
- siteUrl?: string;
321
+ /** When true, apply KRAS (Korean Archaeological Society) branding */
322
+ isKrasNewsletter?: boolean;
323
+ /** Site base URL for constructing links (default: 'https://heripo.app') */
324
+ siteUrl?: string;
327
325
  }
328
326
  /**
329
327
  * Repository interface for newsletter management
330
328
  */
331
329
  interface NewsletterRepository {
332
- /**
333
- * Titles of actually published issues in [fromInclusive, toExclusive).
334
- * Scope the query to this newsletter/audience; exclude drafts and failed sends.
335
- * Providing this method enables the preceding seven calendar days title guard.
336
- */
337
- findRecentPublishedTitles?(range: {
338
- fromInclusive: IsoDateString;
339
- toExclusive: IsoDateString;
340
- }): Promise<string[]>;
341
- /**
342
- * Get the next issue order number
343
- * @returns Next issue order
344
- */
345
- getNextIssueOrder(): Promise<number>;
346
- /**
347
- * Save newsletter
348
- * @param input - Input parameters
349
- * @param input.newsletter - Newsletter data
350
- * @param input.usedArticles - List of used articles
351
- * @param input.submittedPapers - Submitted papers rendered in this
352
- * newsletter; empty when none were supplied or the source failed
353
- * @returns Saved newsletter ID
354
- */
355
- saveNewsletter(input: {
356
- newsletter: Newsletter;
357
- usedArticles: ArticleForGenerateContent[];
358
- submittedPapers: SubmittedPaper[];
359
- }): Promise<{
360
- id: string | number;
361
- }>;
330
+ /**
331
+ * Titles of actually published issues in [fromInclusive, toExclusive).
332
+ * Scope the query to this newsletter/audience; exclude drafts and failed sends.
333
+ * Providing this method enables the preceding seven calendar days title guard.
334
+ */
335
+ findRecentPublishedTitles?(range: {
336
+ fromInclusive: IsoDateString;
337
+ toExclusive: IsoDateString;
338
+ }): Promise<string[]>;
339
+ /**
340
+ * Get the next issue order number
341
+ * @returns Next issue order
342
+ */
343
+ getNextIssueOrder(): Promise<number>;
344
+ /**
345
+ * Save newsletter
346
+ * @param input - Input parameters
347
+ * @param input.newsletter - Newsletter data
348
+ * @param input.usedArticles - List of used articles
349
+ * @param input.submittedPapers - Submitted papers rendered in this
350
+ * newsletter; empty when none were supplied or the source failed
351
+ * @returns Saved newsletter ID
352
+ */
353
+ saveNewsletter(input: {
354
+ newsletter: Newsletter;
355
+ usedArticles: ArticleForGenerateContent[];
356
+ submittedPapers: SubmittedPaper[];
357
+ }): Promise<{
358
+ id: string | number;
359
+ }>;
362
360
  }
363
361
  /**
364
362
  * Storage for 나라장터 triage verdicts, so a judgement outlives its run.
@@ -387,35 +385,26 @@ interface NewsletterRepository {
387
385
  * not have to defend its own synchronous paths.
388
386
  */
389
387
  interface HeritageBidVerdictStore {
390
- /**
391
- * Verdicts for the keys that are known. Unknown keys are simply absent.
392
- */
393
- load(keys: readonly string[]): Promise<ReadonlyMap<string, boolean>>;
394
- /**
395
- * Persists verdicts the model made. Verdicts that came from the
396
- * deterministic fallback are never passed here.
397
- */
398
- save(verdicts: ReadonlyMap<string, boolean>): Promise<void>;
388
+ /**
389
+ * Verdicts for the keys that are known. Unknown keys are simply absent.
390
+ */
391
+ load(keys: readonly string[]): Promise<ReadonlyMap<string, boolean>>;
392
+ /**
393
+ * Persists verdicts the model made. Verdicts that came from the
394
+ * deterministic fallback are never passed here.
395
+ */
396
+ save(verdicts: ReadonlyMap<string, boolean>): Promise<void>;
399
397
  }
400
-
401
- /**
402
- * Uses the required OpenAI key for every default model. Each task accepts an
403
- * OpenAI model ID or an AI SDK LanguageModel directly. The compatibility
404
- * content-generation option can still select Anthropic or Google.
405
- *
406
- * `models.generateNewsletter` takes precedence over `contentGeneration`.
407
- */
408
-
409
398
  /**
410
399
  * Preview newsletter configuration options
411
400
  */
412
401
  interface PreviewNewsletterOptions {
413
- /** Function to fetch newsletter for preview */
414
- fetchNewsletterForPreview: () => Promise<Newsletter>;
415
- /** Email sending service */
416
- emailService: EmailService;
417
- /** Email message configuration (subject, html, text are auto-generated) */
418
- emailMessage: Omit<EmailMessage, 'subject' | 'html' | 'text'>;
402
+ /** Function to fetch newsletter for preview */
403
+ fetchNewsletterForPreview: () => Promise<Newsletter>;
404
+ /** Email sending service */
405
+ emailService: EmailService;
406
+ /** Email message configuration (subject, html, text are auto-generated) */
407
+ emailMessage: Omit<EmailMessage, 'subject' | 'html' | 'text'>;
419
408
  }
420
409
  /**
421
410
  * Content generation LLM provider configuration.
@@ -428,17 +417,17 @@ interface PreviewNewsletterOptions {
428
417
  * - google: `gemini-3.1-pro-preview`
429
418
  */
430
419
  type ContentGenerationConfig = {
431
- provider: 'openai';
432
- apiKey: string;
433
- model?: string;
420
+ provider: 'openai';
421
+ apiKey: string;
422
+ model?: string;
434
423
  } | {
435
- provider: 'anthropic';
436
- apiKey: string;
437
- model?: string;
424
+ provider: 'anthropic';
425
+ apiKey: string;
426
+ model?: string;
438
427
  } | {
439
- provider: 'google';
440
- apiKey: string;
441
- model?: string;
428
+ provider: 'google';
429
+ apiKey: string;
430
+ model?: string;
442
431
  };
443
432
  /**
444
433
  * OpenAI model IDs or AI SDK LanguageModel instances used by each LLM task.
@@ -448,119 +437,119 @@ type ContentGenerationConfig = {
448
437
  * option; `models.generateNewsletter` takes precedence when both are supplied.
449
438
  */
450
439
  interface NewsletterModelConfig {
451
- heritageBidTriage?: string | LanguageModel;
452
- classifyTags?: string | LanguageModel;
453
- analyzeImages?: string | LanguageModel;
454
- determineImportance?: string | LanguageModel;
455
- generateNewsletter?: string | LanguageModel;
440
+ heritageBidTriage?: string | LanguageModel;
441
+ classifyTags?: string | LanguageModel;
442
+ analyzeImages?: string | LanguageModel;
443
+ determineImportance?: string | LanguageModel;
444
+ generateNewsletter?: string | LanguageModel;
456
445
  }
457
446
  /**
458
447
  * Newsletter generator dependencies interface
459
448
  */
460
449
  interface NewsletterGeneratorDependencies {
461
- /** OpenAI API key used by every default model. */
462
- openAIApiKey: string;
463
- /** OpenAI model IDs or AI SDK model instances for every LLM task (optional). */
464
- models?: NewsletterModelConfig;
465
- /**
466
- * Opt in to original-article deadline extraction. An omitted model reuses the
467
- * importance model; a string is resolved through the supplied OpenAI key.
468
- * Repositories must persist deadlines, including an empty array. Omit to keep
469
- * the existing analysis calls. This does not activate reminders on candidates.
470
- */
471
- extractDeadlineOptions?: {
472
- model?: string | LanguageModel;
473
- /** Include conferences, public site visits and other dated attendance opportunities. */
474
- includeEvents?: boolean;
475
- };
476
- /**
477
- * Non-OpenAI content generation configuration (optional).
478
- *
479
- * Prefer `models.generateNewsletter`. String IDs use `openAIApiKey`; model
480
- * instances use their own provider configuration.
481
- * This remains available for Anthropic/Google compatibility.
482
- */
483
- contentGeneration?: ContentGenerationConfig;
484
- /** Task management repository */
485
- taskRepository: TaskRepository;
486
- /** Article management repository */
487
- articleRepository: ArticleRepository;
488
- /** Tag management repository */
489
- tagRepository: TagRepository;
490
- /** Newsletter management repository */
491
- newsletterRepository: NewsletterRepository;
492
- /** Logger (optional) */
493
- logger?: AppLogger;
494
- /** Preview email configuration (optional) */
495
- previewNewsletter?: PreviewNewsletterOptions;
496
- /**
497
- * Publication date override in ISO format (optional).
498
- * When provided, this date is used as the newsletter's publication date instead of the current date.
499
- * Useful for generating a newsletter today but publishing it on a future date.
500
- * @example "2025-02-12"
501
- */
502
- publishDate?: string;
503
- /** Newsletter template customization options (optional) */
504
- templateOptions?: NewsletterTemplateOptions;
505
- /** Custom fetch function for crawling (e.g., proxy-based fetch). Optional. */
506
- customFetch?: typeof fetch;
507
- /**
508
- * Supplies 국가유산청 발굴조사 보고서 entries from the application (optional).
509
- *
510
- * When provided, that board is read from this function and never crawled,
511
- * which lets an application that already stores the reports reuse them. Omit
512
- * it to keep crawling the board as before. No other target is affected.
513
- */
514
- excavationReportSource?: ExcavationReportSource;
515
- /**
516
- * Supplies newly published journal issues from the application (optional),
517
- * such as those collected from KCI.
518
- *
519
- * Each issue becomes one article listing its papers. The target has no live
520
- * board, so omitting this leaves it empty without making a request. The
521
- * article's `uniqId` is the issue's `externalId` and its URL the issue's
522
- * `url`; store either when articles are saved to record which issues a
523
- * saved newsletter introduced.
524
- */
525
- journalIssueSource?: JournalIssueSource;
526
- /**
527
- * Supplies submitted papers to introduce in this run (optional): theses and
528
- * journal papers outside KCI that authors applied for and an administrator
529
- * entered after review.
530
- *
531
- * They are rendered in the journal section after the KCI issues when the
532
- * newsletter is saved, without being crawled, scored or shown to a model,
533
- * and do not count toward the publication criteria. The ones rendered come
534
- * back in `saveNewsletter`'s `submittedPapers`; a run that saves no
535
- * newsletter consumes none.
536
- */
537
- submittedPaperSource?: SubmittedPaperSource;
538
- /**
539
- * data.go.kr service key for the 나라일터 and 알리오 job boards (optional).
540
- *
541
- * Pass the encoded key exactly as the portal supplies it. Both boards are read
542
- * through open APIs rather than scraped; omit the key and they collect
543
- * nothing while every other target is unaffected.
544
- */
545
- publicDataApiKey?: string;
546
- /**
547
- * Storage for 나라장터 triage verdicts (optional).
548
- *
549
- * The window is 48 hours and the run is daily, so half of every window was
550
- * already judged by the previous run — almost all of it rejections, which
551
- * never reach `saveCrawledArticles` and so cannot be recognised from the
552
- * article table. Supply a store and that half is read back instead of being
553
- * sent to the model again; omit it and each run judges the whole window.
554
- */
555
- heritageBidVerdictStore?: HeritageBidVerdictStore;
556
- /**
557
- * LLM prompt overrides (optional).
558
- *
559
- * When provided, this replaces Research Radar's own prompt provider entirely
560
- * rather than merging with it. Omit it to use the package's tuned prompts,
561
- * which in turn fall back to core's defaults for any stage they do not define.
562
- */
563
- promptProvider?: PromptProvider;
450
+ /** OpenAI API key used by every default model. */
451
+ openAIApiKey: string;
452
+ /** OpenAI model IDs or AI SDK model instances for every LLM task (optional). */
453
+ models?: NewsletterModelConfig;
454
+ /**
455
+ * Opt in to original-article deadline extraction. An omitted model reuses the
456
+ * importance model; a string is resolved through the supplied OpenAI key.
457
+ * Repositories must persist deadlines, including an empty array. Omit to keep
458
+ * the existing analysis calls. This does not activate reminders on candidates.
459
+ */
460
+ extractDeadlineOptions?: {
461
+ model?: string | LanguageModel;
462
+ /** Include conferences, public site visits and other dated attendance opportunities. */
463
+ includeEvents?: boolean;
464
+ };
465
+ /**
466
+ * Non-OpenAI content generation configuration (optional).
467
+ *
468
+ * Prefer `models.generateNewsletter`. String IDs use `openAIApiKey`; model
469
+ * instances use their own provider configuration.
470
+ * This remains available for Anthropic/Google compatibility.
471
+ */
472
+ contentGeneration?: ContentGenerationConfig;
473
+ /** Task management repository */
474
+ taskRepository: TaskRepository;
475
+ /** Article management repository */
476
+ articleRepository: ArticleRepository;
477
+ /** Tag management repository */
478
+ tagRepository: TagRepository;
479
+ /** Newsletter management repository */
480
+ newsletterRepository: NewsletterRepository;
481
+ /** Logger (optional) */
482
+ logger?: AppLogger;
483
+ /** Preview email configuration (optional) */
484
+ previewNewsletter?: PreviewNewsletterOptions;
485
+ /**
486
+ * Publication date override in ISO format (optional).
487
+ * When provided, this date is used as the newsletter's publication date instead of the current date.
488
+ * Useful for generating a newsletter today but publishing it on a future date.
489
+ * @example "2025-02-12"
490
+ */
491
+ publishDate?: string;
492
+ /** Newsletter template customization options (optional) */
493
+ templateOptions?: NewsletterTemplateOptions;
494
+ /** Custom fetch function for crawling (e.g., proxy-based fetch). Optional. */
495
+ customFetch?: typeof fetch;
496
+ /**
497
+ * Supplies 국가유산청 발굴조사 보고서 entries from the application (optional).
498
+ *
499
+ * When provided, that board is read from this function and never crawled,
500
+ * which lets an application that already stores the reports reuse them. Omit
501
+ * it to keep crawling the board as before. No other target is affected.
502
+ */
503
+ excavationReportSource?: ExcavationReportSource;
504
+ /**
505
+ * Supplies newly published journal issues from the application (optional),
506
+ * such as those collected from KCI.
507
+ *
508
+ * Each issue becomes one article listing its papers. The target has no live
509
+ * board, so omitting this leaves it empty without making a request. The
510
+ * article's `uniqId` is the issue's `externalId` and its URL the issue's
511
+ * `url`; store either when articles are saved to record which issues a
512
+ * saved newsletter introduced.
513
+ */
514
+ journalIssueSource?: JournalIssueSource;
515
+ /**
516
+ * Supplies submitted papers to introduce in this run (optional): theses and
517
+ * journal papers outside KCI that authors applied for and an administrator
518
+ * entered after review.
519
+ *
520
+ * They are rendered in the journal section after the KCI issues when the
521
+ * newsletter is saved, without being crawled, scored or shown to a model,
522
+ * and do not count toward the publication criteria. The ones rendered come
523
+ * back in `saveNewsletter`'s `submittedPapers`; a run that saves no
524
+ * newsletter consumes none.
525
+ */
526
+ submittedPaperSource?: SubmittedPaperSource;
527
+ /**
528
+ * data.go.kr service key for the 나라일터 and 알리오 job boards (optional).
529
+ *
530
+ * Pass the encoded key exactly as the portal supplies it. Both boards are read
531
+ * through open APIs rather than scraped; omit the key and they collect
532
+ * nothing while every other target is unaffected.
533
+ */
534
+ publicDataApiKey?: string;
535
+ /**
536
+ * Storage for 나라장터 triage verdicts (optional).
537
+ *
538
+ * The window is 48 hours and the run is daily, so half of every window was
539
+ * already judged by the previous run — almost all of it rejections, which
540
+ * never reach `saveCrawledArticles` and so cannot be recognised from the
541
+ * article table. Supply a store and that half is read back instead of being
542
+ * sent to the model again; omit it and each run judges the whole window.
543
+ */
544
+ heritageBidVerdictStore?: HeritageBidVerdictStore;
545
+ /**
546
+ * LLM prompt overrides (optional).
547
+ *
548
+ * When provided, this replaces Research Radar's own prompt provider entirely
549
+ * rather than merging with it. Omit it to use the package's tuned prompts,
550
+ * which in turn fall back to core's defaults for any stage they do not define.
551
+ */
552
+ promptProvider?: PromptProvider;
564
553
  }
565
554
  /**
566
555
  * Newsletter generation execution function
@@ -583,8 +572,7 @@ interface NewsletterGeneratorDependencies {
583
572
  * });
584
573
  * ```
585
574
  */
586
- declare function generateNewsletter(dependencies: NewsletterGeneratorDependencies): Promise<string | number | null>;
587
-
575
+ export declare function generateNewsletter(dependencies: NewsletterGeneratorDependencies): Promise<string | number | null>;
588
576
  /**
589
577
  * Board URL of the journal issue target.
590
578
  *
@@ -592,8 +580,7 @@ declare function generateNewsletter(dependencies: NewsletterGeneratorDependencie
592
580
  * application's injected issues and never sends it. It points at KCI because
593
581
  * that is where the issues come from, and it is what the source list shows.
594
582
  */
595
- declare const JOURNAL_ISSUE_LIST_URL = "https://www.kci.go.kr/kciportal/main.kci";
596
-
583
+ export declare const JOURNAL_ISSUE_LIST_URL = "https://www.kci.go.kr/kciportal/main.kci";
597
584
  /**
598
585
  * Generates a welcome email HTML string with CSS inlined via juice.
599
586
  *
@@ -616,115 +603,111 @@ declare const JOURNAL_ISSUE_LIST_URL = "https://www.kci.go.kr/kciportal/main.kci
616
603
  * });
617
604
  * ```
618
605
  */
619
- declare function generateWelcomeHTML(id: string, name: string, options?: WelcomeTemplateOptions): Promise<string>;
620
-
606
+ export declare function generateWelcomeHTML(id: string, name: string, options?: WelcomeTemplateOptions): Promise<string>;
621
607
  /**
622
608
  * Date service implementation
623
609
  * - Provides newsletter publication date strings (ISO and localized display form)
624
610
  * - Always returns Korea Standard Time (KST, Asia/Seoul) regardless of server timezone
625
611
  * - Accepts optional publishDate to override "today" (e.g., generating today's run for tomorrow's publication)
626
612
  */
627
- declare class DateService implements DateService$1 {
628
- private readonly targetDate;
629
- /**
630
- * @param publishDate - Optional ISO date string (YYYY-MM-DD) representing the newsletter
631
- * publication date. If omitted, the current wall-clock time (KST)
632
- * is used. Pass tomorrow's date when building the issue the night before.
633
- * @throws {Error} If publishDate is not in YYYY-MM-DD format or is not a real calendar date.
634
- */
635
- constructor(publishDate?: string);
636
- /**
637
- * Get the newsletter publication date in ISO format (YYYY-MM-DD).
638
- * - Always returns date in Korea Standard Time (UTC+9)
639
- * @returns ISO date string (e.g., "2024-10-15")
640
- */
641
- getPublicationISODateString(): IsoDateString;
642
- getCurrentISODateString(): IsoDateString;
643
- /**
644
- * Get the newsletter publication date as a localized display string.
645
- * - Always returns date in Korea Standard Time (UTC+9)
646
- * @returns Korean formatted date (e.g., "2024년 10월 15일")
647
- */
648
- getPublicationDisplayDateString(): string;
649
- getDisplayDateString(): string;
613
+ export declare class DateService implements DateService$1 {
614
+ private readonly targetDate;
615
+ /**
616
+ * @param publishDate - Optional ISO date string (YYYY-MM-DD) representing the newsletter
617
+ * publication date. If omitted, the current wall-clock time (KST)
618
+ * is used. Pass tomorrow's date when building the issue the night before.
619
+ * @throws {Error} If publishDate is not in YYYY-MM-DD format or is not a real calendar date.
620
+ */
621
+ constructor(publishDate?: string);
622
+ /**
623
+ * Get the newsletter publication date in ISO format (YYYY-MM-DD).
624
+ * - Always returns date in Korea Standard Time (UTC+9)
625
+ * @returns ISO date string (e.g., "2024-10-15")
626
+ */
627
+ getPublicationISODateString(): IsoDateString;
628
+ getCurrentISODateString(): IsoDateString;
629
+ /**
630
+ * Get the newsletter publication date as a localized display string.
631
+ * - Always returns date in Korea Standard Time (UTC+9)
632
+ * @returns Korean formatted date (e.g., "2024년 10월 15일")
633
+ */
634
+ getPublicationDisplayDateString(): string;
635
+ getDisplayDateString(): string;
650
636
  }
651
-
652
637
  /**
653
638
  * Task service implementation
654
639
  * - Manages newsletter generation task lifecycle (start/end)
655
640
  * - Prevents duplicate execution
656
641
  */
657
- declare class TaskService implements TaskService$1<number> {
658
- private readonly taskRepository;
659
- private currentTaskId;
660
- constructor(taskRepository: TaskRepository);
661
- /**
662
- * Start a new task
663
- * @throws Error if a task is already running
664
- * @returns Task ID
665
- */
666
- start(): Promise<number>;
667
- /**
668
- * End the current task
669
- * @throws Error if no task is running
670
- */
671
- end(): Promise<void>;
642
+ export declare class TaskService implements TaskService$1<number> {
643
+ private readonly taskRepository;
644
+ private currentTaskId;
645
+ constructor(taskRepository: TaskRepository);
646
+ /**
647
+ * Start a new task
648
+ * @throws Error if a task is already running
649
+ * @returns Task ID
650
+ */
651
+ start(): Promise<number>;
652
+ /**
653
+ * End the current task
654
+ * @throws Error if no task is running
655
+ */
656
+ end(): Promise<void>;
672
657
  }
673
-
674
658
  interface AnalysisModels {
675
- classifyTags: LanguageModel;
676
- analyzeImages: LanguageModel;
677
- determineImportance: LanguageModel;
678
- extractDeadlines?: LanguageModel;
679
- /** Event extraction is enabled only together with extractDeadlines. */
680
- includeEvents?: boolean;
681
- /**
682
- * Fetch used to download article images for image analysis. Core sends the
683
- * image bytes rather than their URLs, so this should apply the same proxy
684
- * and robots.txt policy as crawling. Omitted, core's own download is used,
685
- * which checks each address as it connects.
686
- */
687
- imageFetch?: typeof fetch;
659
+ classifyTags: LanguageModel;
660
+ analyzeImages: LanguageModel;
661
+ determineImportance: LanguageModel;
662
+ extractDeadlines?: LanguageModel;
663
+ /** Event extraction is enabled only together with extractDeadlines. */
664
+ includeEvents?: boolean;
665
+ /**
666
+ * Fetch used to download article images for image analysis. Core sends the
667
+ * image bytes rather than their URLs, so this should apply the same proxy
668
+ * and robots.txt policy as crawling. Omitted, core's own download is used,
669
+ * which checks each address as it connects.
670
+ */
671
+ imageFetch?: typeof fetch;
688
672
  }
689
673
  /**
690
674
  * Analysis provider implementation
691
675
  * - LLM-based article analysis
692
676
  * - Tag classification, image analysis, importance scoring
693
677
  */
694
- declare class AnalysisProvider implements AnalysisProvider$1 {
695
- private readonly articleRepository;
696
- private readonly tagRepository;
697
- classifyTagOptions: {
698
- model: LanguageModel;
699
- };
700
- analyzeImagesOptions: AnalysisProvider$1['analyzeImagesOptions'];
701
- extractDeadlineOptions?: AnalysisProvider$1['extractDeadlineOptions'];
702
- determineScoreOptions: {
703
- model: LanguageModel;
704
- minimumImportanceScoreRules: Array<{
705
- targetUrl: string;
706
- minScore: number;
707
- }>;
708
- };
709
- constructor(openai: OpenAIProvider, articleRepository: ArticleRepository, tagRepository: TagRepository);
710
- constructor(models: AnalysisModels, articleRepository: ArticleRepository, tagRepository: TagRepository);
711
- /**
712
- * Fetch articles that haven't been scored yet
713
- * @returns Unscored articles awaiting analysis
714
- */
715
- fetchUnscoredArticles(): Promise<UnscoredArticle[]>;
716
- /**
717
- * Fetch all existing tags for classification
718
- * @returns List of tag names
719
- */
720
- fetchTags(): Promise<string[]>;
721
- /**
722
- * Update article with analysis results (tags, image analysis, importance score)
723
- * @param article - Article with analysis data
724
- */
725
- update(article: ArticleForUpdateByAnalysis): Promise<void>;
678
+ export declare class AnalysisProvider implements AnalysisProvider$1 {
679
+ private readonly articleRepository;
680
+ private readonly tagRepository;
681
+ classifyTagOptions: {
682
+ model: LanguageModel;
683
+ };
684
+ analyzeImagesOptions: AnalysisProvider$1['analyzeImagesOptions'];
685
+ extractDeadlineOptions?: AnalysisProvider$1['extractDeadlineOptions'];
686
+ determineScoreOptions: {
687
+ model: LanguageModel;
688
+ minimumImportanceScoreRules: Array<{
689
+ targetUrl: string;
690
+ minScore: number;
691
+ }>;
692
+ };
693
+ constructor(openai: OpenAIProvider, articleRepository: ArticleRepository, tagRepository: TagRepository);
694
+ constructor(models: AnalysisModels, articleRepository: ArticleRepository, tagRepository: TagRepository);
695
+ /**
696
+ * Fetch articles that haven't been scored yet
697
+ * @returns Unscored articles awaiting analysis
698
+ */
699
+ fetchUnscoredArticles(): Promise<UnscoredArticle[]>;
700
+ /**
701
+ * Fetch all existing tags for classification
702
+ * @returns List of tag names
703
+ */
704
+ fetchTags(): Promise<string[]>;
705
+ /**
706
+ * Update article with analysis results (tags, image analysis, importance score)
707
+ * @param article - Article with analysis data
708
+ */
709
+ update(article: ArticleForUpdateByAnalysis): Promise<void>;
726
710
  }
727
-
728
711
  /**
729
712
  * Chooses which eligible reminders the unified section displays.
730
713
  *
@@ -732,24 +715,24 @@ declare class AnalysisProvider implements AnalysisProvider$1 {
732
715
  */
733
716
  type DeadlineReminderSelector = (rows: EligibleDeadlineReminder[], publicationDate: IsoDateString) => Promise<EligibleDeadlineReminder[]>;
734
717
  type DeadlineReminderSelectorOptions = {
735
- /** Same model that scores article importance. */
736
- model: LanguageModel;
737
- /**
738
- * Milliseconds before the selection gives up and falls back. It runs while
739
- * saving a fully generated issue, so a stalled provider must not hold it.
740
- * @default 60000
741
- */
742
- timeoutMs?: number;
743
- /** Reports a selection that fell back to the first rows by date. */
744
- onFallback?: (reason: string, candidateCount: number) => void;
745
- /** Reports a model selection and its token usage. */
746
- onSelected?: (info: {
747
- candidateCount: number;
748
- selectedCount: number;
749
- /** Rows added by date order because the model chose too few. */
750
- filledCount: number;
751
- usage: unknown;
752
- }) => void;
718
+ /** Same model that scores article importance. */
719
+ model: LanguageModel;
720
+ /**
721
+ * Milliseconds before the selection gives up and falls back. It runs while
722
+ * saving a fully generated issue, so a stalled provider must not hold it.
723
+ * @default 60000
724
+ */
725
+ timeoutMs?: number;
726
+ /** Reports a selection that fell back to the first rows by date. */
727
+ onFallback?: (reason: string, candidateCount: number) => void;
728
+ /** Reports a model selection and its token usage. */
729
+ onSelected?: (info: {
730
+ candidateCount: number;
731
+ selectedCount: number;
732
+ /** Rows added by date order because the model chose too few. */
733
+ filledCount: number;
734
+ usage: unknown;
735
+ }) => void;
753
736
  };
754
737
  /**
755
738
  * Builds the model selection that replaces "first rows by date".
@@ -763,50 +746,47 @@ type DeadlineReminderSelectorOptions = {
763
746
  * unusable indices fall back to the first rows by date. A selection shorter
764
747
  * than the rows available is filled in date order, skipping named duplicates.
765
748
  */
766
- declare const createDeadlineReminderSelector: (options: DeadlineReminderSelectorOptions) => DeadlineReminderSelector;
767
-
749
+ export declare const createDeadlineReminderSelector: (options: DeadlineReminderSelectorOptions) => DeadlineReminderSelector;
768
750
  /** Memoized access to one run's injected items. */
769
751
  type SourceLoader<T> = () => Promise<T[]>;
770
752
  /** Memoized access to one run's injected journal issues. */
771
753
  type JournalIssueLoader = SourceLoader<JournalIssue>;
772
-
773
754
  /** Which papers of an issue the table shows, and which it summarizes. */
774
755
  type JournalPaperSelection = {
775
- /** Paper indices shown in the table, most interesting first. */
776
- featured: number[];
777
- /** Papers collapsed into a count and topic summary, in paper order. */
778
- others: {
779
- index: number;
780
- topic: string | null;
781
- }[];
756
+ /** Paper indices shown in the table, most interesting first. */
757
+ featured: number[];
758
+ /** Papers collapsed into a count and topic summary, in paper order. */
759
+ others: {
760
+ index: number;
761
+ topic: string | null;
762
+ }[];
782
763
  };
783
764
  /**
784
765
  * Picks the papers the newsletter's readers would want to see, or returns null
785
766
  * when no selection could be made — the section then lists every paper.
786
767
  */
787
768
  type JournalPaperSelector = (issue: JournalIssue) => Promise<JournalPaperSelection | null>;
788
-
789
769
  /**
790
770
  * Injected journal issues are rendered by the provider rather than written by
791
771
  * the model: each is a table of up to twenty titles and author lists, which
792
772
  * the model would have to copy exactly.
793
773
  */
794
774
  type JournalIssueRendering = {
795
- /** The run's injected issues, matched to candidates by URL. */
796
- load: JournalIssueLoader;
797
- /** Picks the papers readers would care about; omitted, every paper is listed. */
798
- select?: JournalPaperSelector;
799
- /** Reports that the issues could not be loaded, so the model got them. */
800
- onUnavailable?: (reason: string) => void;
801
- /** Reports body lines about the issues removed despite the prompt. */
802
- onBodyMentionsRemoved?: (removed: number) => void;
803
- /**
804
- * The run's submitted papers, rendered after the issues when the newsletter
805
- * is saved. They are not candidates and never reach the model.
806
- */
807
- loadSubmittedPapers?: SourceLoader<SubmittedPaper>;
808
- /** Reports that the submitted papers could not be loaded and were left out. */
809
- onSubmittedPapersUnavailable?: (reason: string) => void;
775
+ /** The run's injected issues, matched to candidates by URL. */
776
+ load: JournalIssueLoader;
777
+ /** Picks the papers readers would care about; omitted, every paper is listed. */
778
+ select?: JournalPaperSelector;
779
+ /** Reports that the issues could not be loaded, so the model got them. */
780
+ onUnavailable?: (reason: string) => void;
781
+ /** Reports body lines about the issues removed despite the prompt. */
782
+ onBodyMentionsRemoved?: (removed: number) => void;
783
+ /**
784
+ * The run's submitted papers, rendered after the issues when the newsletter
785
+ * is saved. They are not candidates and never reach the model.
786
+ */
787
+ loadSubmittedPapers?: SourceLoader<SubmittedPaper>;
788
+ /** Reports that the submitted papers could not be loaded and were left out. */
789
+ onSubmittedPapersUnavailable?: (reason: string) => void;
810
790
  };
811
791
  /**
812
792
  * Content generation provider implementation
@@ -814,161 +794,156 @@ type JournalIssueRendering = {
814
794
  * - HTML template provisioning
815
795
  * - Newsletter persistence
816
796
  */
817
- declare class ContentGenerateProvider implements ContentGenerateProvider$1 {
818
- private readonly articleRepository;
819
- private readonly newsletterRepository;
820
- private readonly templateOptions?;
821
- /** Chooses displayed reminders; omitted, the first rows by date display. */
822
- private readonly selectDeadlineReminders?;
823
- private readonly journalIssues?;
824
- private _issueOrder;
825
- private readonly deadlineRemindersMarkdown;
826
- private heldJournalIssues;
827
- readonly model: LanguageModel;
828
- readonly fetchRecentTitles?: ContentGenerateProvider$1['fetchRecentTitles'];
829
- /** HTML template with markers for title and content injection */
830
- htmlTemplate: HtmlTemplate;
831
- /** Newsletter brand name (defaults to config, can be overridden via constructor) */
832
- newsletterBrandName: string;
833
- constructor(model: LanguageModel, articleRepository: ArticleRepository, newsletterRepository: NewsletterRepository, templateOptions?: NewsletterTemplateOptions | undefined, brandName?: string,
834
- /** Chooses displayed reminders; omitted, the first rows by date display. */
835
- selectDeadlineReminders?: DeadlineReminderSelector | undefined, journalIssues?: JournalIssueRendering | undefined);
836
- /** LLM temperature setting for content generation */
837
- temperature: number;
838
- /** Subscribe page URL */
839
- subscribePageUrl: UrlString;
840
- /** Publication criteria (minimum article count, priority score threshold) */
841
- publicationCriteria: {
842
- minimumArticleCountForIssue: number;
843
- priorityArticleScoreThreshold: number;
844
- };
845
- /**
846
- * Get current issue order
847
- * @throws Error if issue order not initialized
848
- */
849
- get issueOrder(): number;
850
- /**
851
- * Initialize issue order before newsletter generation
852
- */
853
- initializeIssueOrder(): Promise<void>;
854
- /**
855
- * Fetch candidate articles for newsletter generation
856
- * @returns Articles eligible for inclusion in the newsletter
857
- */
858
- fetchArticleCandidates(): Promise<ArticleForGenerateContent[]>;
859
- /**
860
- * Save generated newsletter to the repository
861
- * @param input - Newsletter data and used articles
862
- * @returns Saved newsletter ID
863
- */
864
- saveNewsletter(input: {
865
- newsletter: Newsletter;
866
- usedArticles: ArticleForGenerateContent[];
867
- }): Promise<{
868
- id: string | number;
869
- }>;
870
- /**
871
- * Drops what the model wrote about the held issues outside the briefing.
872
- * The prompt already keeps them out of the body; this makes it certain, so
873
- * an issue never appears both as a model-written row and in the table.
874
- */
875
- private removeJournalIssueMentions;
876
- /**
877
- * Renders the held issues and the submitted papers. `submittedPapers` are the
878
- * ones actually rendered, so the repository marks exactly those introduced.
879
- */
880
- private renderJournalIssues;
881
- /** A failed source leaves the papers out of this newsletter, never fails it. */
882
- private loadSubmittedPapers;
883
- private renderDeadlineReminders;
797
+ export declare class ContentGenerateProvider implements ContentGenerateProvider$1 {
798
+ private readonly articleRepository;
799
+ private readonly newsletterRepository;
800
+ private readonly templateOptions?;
801
+ /** Chooses displayed reminders; omitted, the first rows by date display. */
802
+ private readonly selectDeadlineReminders?;
803
+ private readonly journalIssues?;
804
+ private _issueOrder;
805
+ private readonly deadlineRemindersMarkdown;
806
+ private heldJournalIssues;
807
+ readonly model: LanguageModel;
808
+ readonly fetchRecentTitles?: ContentGenerateProvider$1['fetchRecentTitles'];
809
+ /** HTML template with markers for title and content injection */
810
+ htmlTemplate: HtmlTemplate;
811
+ /** Newsletter brand name (defaults to config, can be overridden via constructor) */
812
+ newsletterBrandName: string;
813
+ constructor(model: LanguageModel, articleRepository: ArticleRepository, newsletterRepository: NewsletterRepository, templateOptions?: NewsletterTemplateOptions | undefined, brandName?: string,
814
+ /** Chooses displayed reminders; omitted, the first rows by date display. */
815
+ selectDeadlineReminders?: DeadlineReminderSelector | undefined, journalIssues?: JournalIssueRendering | undefined);
816
+ /** LLM temperature setting for content generation */
817
+ temperature: number;
818
+ /** Subscribe page URL */
819
+ subscribePageUrl: UrlString;
820
+ /** Publication criteria (minimum article count, priority score threshold) */
821
+ publicationCriteria: {
822
+ minimumArticleCountForIssue: number;
823
+ priorityArticleScoreThreshold: number;
824
+ };
825
+ /**
826
+ * Get current issue order
827
+ * @throws Error if issue order not initialized
828
+ */
829
+ get issueOrder(): number;
830
+ /**
831
+ * Initialize issue order before newsletter generation
832
+ */
833
+ initializeIssueOrder(): Promise<void>;
834
+ /**
835
+ * Fetch candidate articles for newsletter generation
836
+ * @returns Articles eligible for inclusion in the newsletter
837
+ */
838
+ fetchArticleCandidates(): Promise<ArticleForGenerateContent[]>;
839
+ /**
840
+ * Save generated newsletter to the repository
841
+ * @param input - Newsletter data and used articles
842
+ * @returns Saved newsletter ID
843
+ */
844
+ saveNewsletter(input: {
845
+ newsletter: Newsletter;
846
+ usedArticles: ArticleForGenerateContent[];
847
+ }): Promise<{
848
+ id: string | number;
849
+ }>;
850
+ /**
851
+ * Drops what the model wrote about the held issues outside the briefing.
852
+ * The prompt already keeps them out of the body; this makes it certain, so
853
+ * an issue never appears both as a model-written row and in the table.
854
+ */
855
+ private removeJournalIssueMentions;
856
+ /**
857
+ * Renders the held issues and the submitted papers. `submittedPapers` are the
858
+ * ones actually rendered, so the repository marks exactly those introduced.
859
+ */
860
+ private renderJournalIssues;
861
+ /** A failed source leaves the papers out of this newsletter, never fails it. */
862
+ private loadSubmittedPapers;
863
+ private renderDeadlineReminders;
884
864
  }
885
-
886
865
  type HeritageBidCandidate = {
887
- /** Issuing and requesting institutions, joined. */
888
- institution: string;
889
- /** Notice title. */
890
- title: string;
891
- /** `pubPrcrmntMidClsfcNm`, when the notice carries one. */
892
- classification?: string | null;
866
+ /** Issuing and requesting institutions, joined. */
867
+ institution: string;
868
+ /** Notice title. */
869
+ title: string;
870
+ /** `pubPrcrmntMidClsfcNm`, when the notice carries one. */
871
+ classification?: string | null;
893
872
  };
894
-
895
873
  /**
896
874
  * Decides which 나라장터 notices are worth scoring, one batch at a time.
897
875
  *
898
876
  * Returns one verdict per candidate, in the order they were given.
899
877
  */
900
878
  type HeritageBidTriage = (candidates: HeritageBidCandidate[], signal?: AbortSignal) => Promise<boolean[]>;
901
-
902
879
  /**
903
880
  * Crawling provider implementation
904
881
  * - Defines crawling targets
905
882
  * - Saves crawling results
906
883
  * - Fetches existing articles
907
884
  */
908
- declare class CrawlingProvider implements CrawlingProvider$1 {
909
- private readonly articleRepository;
910
- /** Maximum number of concurrent crawling operations */
911
- maxConcurrency: number;
912
- /** Optional custom fetch function (e.g., proxy-based fetch) */
913
- customFetch?: typeof fetch;
914
- /** Crawling target groups configuration */
915
- crawlingTargetGroups: CrawlingTargetGroup[];
916
- constructor(articleRepository: ArticleRepository, customFetch?: typeof fetch, excavationReportSource?: ExcavationReportSource, logger?: AppLogger, publicDataApiKey?: string, bidTriage?: HeritageBidTriage, journalIssueSource?: JournalIssueSource);
917
- /**
918
- * Fetch existing articles by URLs to avoid duplicate crawling
919
- * @param articleUrls - URLs to check
920
- * @returns Existing articles
921
- */
922
- fetchExistingArticlesByUrls(articleUrls: UrlString[]): Promise<ParsedTarget[]>;
923
- /**
924
- * Save crawled articles to the repository
925
- * @param articles - Articles to save
926
- * @param context - Task context (task ID, target group, target)
927
- * @returns Number of saved articles
928
- */
929
- saveCrawledArticles<TaskId>(articles: ParsedTarget[], context: {
930
- taskId: TaskId;
931
- targetGroup: Omit<CrawlingTargetGroup, 'targets'>;
932
- target: CrawlingTarget;
933
- }): Promise<number>;
885
+ export declare class CrawlingProvider implements CrawlingProvider$1 {
886
+ private readonly articleRepository;
887
+ /** Maximum number of concurrent crawling operations */
888
+ maxConcurrency: number;
889
+ /** Optional custom fetch function (e.g., proxy-based fetch) */
890
+ customFetch?: typeof fetch;
891
+ /** Crawling target groups configuration */
892
+ crawlingTargetGroups: CrawlingTargetGroup[];
893
+ constructor(articleRepository: ArticleRepository, customFetch?: typeof fetch, excavationReportSource?: ExcavationReportSource, logger?: AppLogger, publicDataApiKey?: string, bidTriage?: HeritageBidTriage, journalIssueSource?: JournalIssueSource);
894
+ /**
895
+ * Fetch existing articles by URLs to avoid duplicate crawling
896
+ * @param articleUrls - URLs to check
897
+ * @returns Existing articles
898
+ */
899
+ fetchExistingArticlesByUrls(articleUrls: UrlString[]): Promise<ParsedTarget[]>;
900
+ /**
901
+ * Save crawled articles to the repository
902
+ * @param articles - Articles to save
903
+ * @param context - Task context (task ID, target group, target)
904
+ * @returns Number of saved articles
905
+ */
906
+ saveCrawledArticles<TaskId>(articles: ParsedTarget[], context: {
907
+ taskId: TaskId;
908
+ targetGroup: Omit<CrawlingTargetGroup, 'targets'>;
909
+ target: CrawlingTarget;
910
+ }): Promise<number>;
934
911
  }
935
-
936
- declare function createCrawlingTargetGroups(customFetch?: typeof fetch): CrawlingTargetGroup[];
912
+ export declare function createCrawlingTargetGroups(customFetch?: typeof fetch): CrawlingTargetGroup[];
937
913
  interface SourceItem {
938
- id: string;
939
- name: string;
940
- url: string;
914
+ id: string;
915
+ name: string;
916
+ url: string;
941
917
  }
942
918
  interface SourceGroup {
943
- id: string;
944
- name: string;
945
- sources: SourceItem[];
919
+ id: string;
920
+ name: string;
921
+ sources: SourceItem[];
946
922
  }
947
- declare function getSourceList(): SourceGroup[];
948
-
923
+ export declare function getSourceList(): SourceGroup[];
949
924
  /**
950
925
  * Content options type extracted from core GenerateNewsletterConfig
951
926
  */
952
- type ContentOptions = GenerateNewsletterConfig<any>['contentOptions'];
927
+ export type ContentOptions = GenerateNewsletterConfig<any>['contentOptions'];
953
928
  /**
954
929
  * Newsletter brand configuration type
955
930
  */
956
- interface NewsletterConfig {
957
- brandName: string;
958
- subscribePageUrl: string;
959
- publicationCriteria: {
960
- minimumArticleCountForIssue: number;
961
- priorityArticleScoreThreshold: number;
962
- };
931
+ export interface NewsletterConfig {
932
+ brandName: string;
933
+ subscribePageUrl: string;
934
+ publicationCriteria: {
935
+ minimumArticleCountForIssue: number;
936
+ priorityArticleScoreThreshold: number;
937
+ };
963
938
  }
964
939
  /**
965
940
  * Newsletter content configuration
966
941
  */
967
- declare const contentOptions: ContentOptions;
942
+ export declare const contentOptions: ContentOptions;
968
943
  /**
969
944
  * Newsletter brand configuration
970
945
  */
971
- declare const newsletterConfig: NewsletterConfig;
946
+ export declare const newsletterConfig: NewsletterConfig;
972
947
  /**
973
948
  * Maximum importance score per heritage domain (`tag1`).
974
949
  *
@@ -987,7 +962,7 @@ declare const newsletterConfig: NewsletterConfig;
987
962
  *
988
963
  * Domains absent from this map are not capped.
989
964
  */
990
- declare const maximumImportanceScoreByDomain: Record<string, number>;
965
+ export declare const maximumImportanceScoreByDomain: Record<string, number>;
991
966
  /**
992
967
  * Origins exempted from the robots.txt check.
993
968
  *
@@ -1000,25 +975,24 @@ declare const maximumImportanceScoreByDomain: Record<string, number>;
1000
975
  * than the public board it happens to serve, and there is no other route to
1001
976
  * the listing, so the society's boards are collected under this exemption.
1002
977
  */
1003
- declare const robotsExemptOrigins: readonly string[];
978
+ export declare const robotsExemptOrigins: readonly string[];
1004
979
  /**
1005
980
  * LLM configuration
1006
981
  */
1007
- declare const llmConfig: {
1008
- models: {
1009
- heritageBidTriage: string;
1010
- classifyTags: string;
1011
- analyzeImages: string;
1012
- determineImportance: string;
1013
- generateNewsletter: string;
1014
- };
1015
- maxRetries: number;
1016
- chainStopAfterAttempt: number;
1017
- generation: {
1018
- temperature: number;
1019
- };
982
+ export declare const llmConfig: {
983
+ models: {
984
+ heritageBidTriage: string;
985
+ classifyTags: string;
986
+ analyzeImages: string;
987
+ determineImportance: string;
988
+ generateNewsletter: string;
989
+ };
990
+ maxRetries: number;
991
+ chainStopAfterAttempt: number;
992
+ generation: {
993
+ temperature: number;
994
+ };
1020
995
  };
1021
-
1022
996
  /**
1023
997
  * Research Radar's LLM prompt overrides.
1024
998
  *
@@ -1047,67 +1021,63 @@ declare const llmConfig: {
1047
1021
  * after every edit — its source cannot be imported directly across repos
1048
1022
  * because of the `~/*` path alias.
1049
1023
  */
1050
- declare const researchRadarPromptProvider: PromptProvider;
1051
-
1024
+ export declare const researchRadarPromptProvider: PromptProvider;
1052
1025
  type ResearchRadarDeadlineExtractionConfig = Omit<ExtractArticleDeadlinesConfig, 'outputLanguage'> & {
1053
- outputLanguage?: string;
1026
+ outputLanguage?: string;
1054
1027
  };
1055
1028
  /** Shared by host-managed backfill and targeted source verification. No DB writes. */
1056
- declare function extractResearchRadarDeadlines(config: ResearchRadarDeadlineExtractionConfig): Promise<ExtractArticleDeadlinesResult>;
1057
-
1029
+ export declare function extractResearchRadarDeadlines(config: ResearchRadarDeadlineExtractionConfig): Promise<ExtractArticleDeadlinesResult>;
1058
1030
  interface ResearchRadarDeadlineSource {
1059
- title: string;
1060
- url: UrlString;
1061
- /** Original board URL retained when the article was collected. */
1062
- targetUrl: UrlString;
1031
+ title: string;
1032
+ url: UrlString;
1033
+ /** Original board URL retained when the article was collected. */
1034
+ targetUrl: UrlString;
1063
1035
  }
1064
1036
  type DeadlineVerificationFailure = 'unsupported-source' | 'invalid-source-url' | 'source-unavailable' | 'empty-source' | 'no-supported-deadlines' | 'extraction-failed';
1065
1037
  type FetchedSource = {
1066
- status: 'fetched';
1067
- article: {
1068
- title: string;
1069
- detailContent: string;
1070
- url: UrlString;
1071
- };
1072
- sourceHash: string;
1073
- checkedAt: string;
1038
+ status: 'fetched';
1039
+ article: {
1040
+ title: string;
1041
+ detailContent: string;
1042
+ url: UrlString;
1043
+ };
1044
+ sourceHash: string;
1045
+ checkedAt: string;
1074
1046
  };
1075
1047
  type UnverifiedSource = {
1076
- status: 'unverified';
1077
- reason: DeadlineVerificationFailure;
1078
- checkedAt: string;
1048
+ status: 'unverified';
1049
+ reason: DeadlineVerificationFailure;
1050
+ checkedAt: string;
1079
1051
  };
1080
1052
  type ResearchRadarDeadlineSourceResult = FetchedSource | UnverifiedSource;
1081
1053
  type ResearchRadarDeadlineRefreshResult = (Omit<FetchedSource, 'status'> & {
1082
- status: 'verified';
1083
- deadlines: ArticleDeadline[];
1084
- /** Preserve this extraction scope when passing the result as previous. */
1085
- includeEvents?: boolean;
1086
- usage: LanguageModelUsage | undefined;
1054
+ status: 'verified';
1055
+ deadlines: ArticleDeadline[];
1056
+ /** Preserve this extraction scope when passing the result as previous. */
1057
+ includeEvents?: boolean;
1058
+ usage: LanguageModelUsage | undefined;
1087
1059
  }) | UnverifiedSource;
1088
1060
  interface ResearchRadarDeadlineSourceOptions {
1089
- source: ResearchRadarDeadlineSource;
1090
- customFetch?: typeof fetch;
1091
- publicDataApiKey?: string;
1092
- /** Total budget for the original page and parser API requests, not LLM calls. */
1093
- timeoutMs?: number;
1061
+ source: ResearchRadarDeadlineSource;
1062
+ customFetch?: typeof fetch;
1063
+ publicDataApiKey?: string;
1064
+ /** Total budget for the original page and parser API requests, not LLM calls. */
1065
+ timeoutMs?: number;
1094
1066
  }
1095
1067
  type ResearchRadarDeadlineRefreshConfig = ResearchRadarDeadlineSourceOptions & Omit<ResearchRadarDeadlineExtractionConfig, 'article'> & {
1096
- /** Cache only a successful extraction from this source. A fresh fetch is mandatory. */
1097
- previous?: {
1098
- sourceHash: string;
1099
- deadlines: ArticleDeadline[];
1100
- /** Missing metadata denotes a legacy deadline-only extraction. */
1101
- includeEvents?: boolean;
1102
- };
1068
+ /** Cache only a successful extraction from this source. A fresh fetch is mandatory. */
1069
+ previous?: {
1070
+ sourceHash: string;
1071
+ deadlines: ArticleDeadline[];
1072
+ /** Missing metadata denotes a legacy deadline-only extraction. */
1073
+ includeEvents?: boolean;
1074
+ };
1103
1075
  };
1104
1076
  /**
1105
1077
  * Fetches only the registered detail source and any API requests its parser
1106
1078
  * requires. Does not enumerate lists, look up existing URLs, score, or save.
1107
1079
  */
1108
- declare function fetchResearchRadarDeadlineSource({ source, customFetch, publicDataApiKey, timeoutMs, }: ResearchRadarDeadlineSourceOptions): Promise<ResearchRadarDeadlineSourceResult>;
1080
+ export declare function fetchResearchRadarDeadlineSource({ source, customFetch, publicDataApiKey, timeoutMs }: ResearchRadarDeadlineSourceOptions): Promise<ResearchRadarDeadlineSourceResult>;
1109
1081
  /** Only explicit, grounded results are verified. Missing dates are never cancellation. */
1110
- declare function refreshResearchRadarDeadlines(config: ResearchRadarDeadlineRefreshConfig): Promise<ResearchRadarDeadlineRefreshResult>;
1111
-
1112
- export { AnalysisProvider, ContentGenerateProvider, CrawlingProvider, DEADLINE_REMINDER_LEAD_DAYS, DEADLINE_REMINDER_LIMIT, DateService, JOURNAL_ISSUE_LIST_URL, TaskService, contentOptions, createCrawlingTargetGroups, createDeadlineReminderSelector, extractResearchRadarDeadlines, fetchResearchRadarDeadlineSource, generateNewsletter, generateWelcomeHTML, getSourceList, llmConfig, maximumImportanceScoreByDomain, newsletterConfig, refreshResearchRadarDeadlines, renderVerifiedDeadlineReminders, researchRadarPromptProvider, robotsExemptOrigins };
1113
- export type { ArticleRepository, ContentGenerationConfig, ContentOptions, DeadlineReminderSelector, DeadlineReminderSelectorOptions, DeadlineVerificationFailure, EligibleDeadlineReminder, ExcavationReport, ExcavationReportSource, HeritageBidVerdictStore, JournalIssue, JournalIssuePaper, JournalIssueSource, NewsletterConfig, NewsletterGeneratorDependencies, NewsletterModelConfig, NewsletterRepository, NewsletterTemplateOptions, PreviewNewsletterOptions, ResearchRadarDeadlineExtractionConfig, ResearchRadarDeadlineRefreshConfig, ResearchRadarDeadlineRefreshResult, ResearchRadarDeadlineSource, ResearchRadarDeadlineSourceOptions, ResearchRadarDeadlineSourceResult, SourceGroup, SourceItem, SubmittedPaper, SubmittedPaperSource, TagRepository, TaskRepository, VerifiedDeadlineReminder, WelcomeTemplateOptions };
1082
+ export declare function refreshResearchRadarDeadlines(config: ResearchRadarDeadlineRefreshConfig): Promise<ResearchRadarDeadlineRefreshResult>;
1083
+ export type { ArticleRepository, ContentGenerationConfig, DeadlineReminderSelector, DeadlineReminderSelectorOptions, DeadlineVerificationFailure, EligibleDeadlineReminder, ExcavationReport, ExcavationReportSource, HeritageBidVerdictStore, JournalIssue, JournalIssuePaper, JournalIssueSource, NewsletterGeneratorDependencies, NewsletterModelConfig, NewsletterRepository, NewsletterTemplateOptions, PreviewNewsletterOptions, ResearchRadarDeadlineExtractionConfig, ResearchRadarDeadlineRefreshConfig, ResearchRadarDeadlineRefreshResult, ResearchRadarDeadlineSource, ResearchRadarDeadlineSourceOptions, ResearchRadarDeadlineSourceResult, SourceGroup, SourceItem, SubmittedPaper, SubmittedPaperSource, TagRepository, TaskRepository, VerifiedDeadlineReminder, WelcomeTemplateOptions };