scientify 1.10.0 → 1.10.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.
Files changed (58) hide show
  1. package/README.md +10 -2
  2. package/README.zh.md +10 -2
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +2 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/src/hooks/research-mode.d.ts.map +1 -1
  7. package/dist/src/hooks/research-mode.js +3 -0
  8. package/dist/src/hooks/research-mode.js.map +1 -1
  9. package/dist/src/hooks/scientify-signature.d.ts.map +1 -1
  10. package/dist/src/hooks/scientify-signature.js +1 -0
  11. package/dist/src/hooks/scientify-signature.js.map +1 -1
  12. package/dist/src/literature/subscription-state.d.ts +90 -0
  13. package/dist/src/literature/subscription-state.d.ts.map +1 -0
  14. package/dist/src/literature/subscription-state.js +521 -0
  15. package/dist/src/literature/subscription-state.js.map +1 -0
  16. package/dist/src/research-subscriptions/constants.d.ts +16 -0
  17. package/dist/src/research-subscriptions/constants.d.ts.map +1 -0
  18. package/dist/src/research-subscriptions/constants.js +59 -0
  19. package/dist/src/research-subscriptions/constants.js.map +1 -0
  20. package/dist/src/research-subscriptions/cron-client.d.ts +8 -0
  21. package/dist/src/research-subscriptions/cron-client.d.ts.map +1 -0
  22. package/dist/src/research-subscriptions/cron-client.js +81 -0
  23. package/dist/src/research-subscriptions/cron-client.js.map +1 -0
  24. package/dist/src/research-subscriptions/delivery.d.ts +10 -0
  25. package/dist/src/research-subscriptions/delivery.d.ts.map +1 -0
  26. package/dist/src/research-subscriptions/delivery.js +82 -0
  27. package/dist/src/research-subscriptions/delivery.js.map +1 -0
  28. package/dist/src/research-subscriptions/handlers.d.ts +6 -0
  29. package/dist/src/research-subscriptions/handlers.d.ts.map +1 -0
  30. package/dist/src/research-subscriptions/handlers.js +203 -0
  31. package/dist/src/research-subscriptions/handlers.js.map +1 -0
  32. package/dist/src/research-subscriptions/parse.d.ts +11 -0
  33. package/dist/src/research-subscriptions/parse.d.ts.map +1 -0
  34. package/dist/src/research-subscriptions/parse.js +478 -0
  35. package/dist/src/research-subscriptions/parse.js.map +1 -0
  36. package/dist/src/research-subscriptions/prompt.d.ts +5 -0
  37. package/dist/src/research-subscriptions/prompt.d.ts.map +1 -0
  38. package/dist/src/research-subscriptions/prompt.js +189 -0
  39. package/dist/src/research-subscriptions/prompt.js.map +1 -0
  40. package/dist/src/research-subscriptions/types.d.ts +65 -0
  41. package/dist/src/research-subscriptions/types.d.ts.map +1 -0
  42. package/dist/src/research-subscriptions/types.js +2 -0
  43. package/dist/src/research-subscriptions/types.js.map +1 -0
  44. package/dist/src/research-subscriptions.d.ts +1 -9
  45. package/dist/src/research-subscriptions.d.ts.map +1 -1
  46. package/dist/src/research-subscriptions.js +1 -761
  47. package/dist/src/research-subscriptions.js.map +1 -1
  48. package/dist/src/tools/scientify-cron.d.ts +20 -0
  49. package/dist/src/tools/scientify-cron.d.ts.map +1 -1
  50. package/dist/src/tools/scientify-cron.js +104 -4
  51. package/dist/src/tools/scientify-cron.js.map +1 -1
  52. package/dist/src/tools/scientify-literature-state.d.ts +70 -0
  53. package/dist/src/tools/scientify-literature-state.d.ts.map +1 -0
  54. package/dist/src/tools/scientify-literature-state.js +312 -0
  55. package/dist/src/tools/scientify-literature-state.js.map +1 -0
  56. package/package.json +1 -1
  57. package/skills/_shared/workspace-spec.md +4 -1
  58. package/skills/research-subscription/SKILL.md +14 -1
@@ -0,0 +1,189 @@
1
+ import { DEFAULT_CRON_PROMPT, DEFAULT_SCORE_WEIGHTS, REMINDER_HINT_RE, RESEARCH_HINT_RE, SCIENTIFY_SIGNATURE_FOOTER, } from "./constants.js";
2
+ import { formatScoreWeights, resolveCandidatePool } from "./parse.js";
3
+ const RESEARCH_WORKFLOW_VERB_RE = /\b(search|survey|analy[sz]e|filter|track|monitor|update|summari[sz]e|report|plan)\b|检索|调研|筛选|跟踪|追踪|更新|总结|汇报|规划/u;
4
+ function normalizeReminderText(raw) {
5
+ let text = raw.trim();
6
+ text = text.replace(/^(please\s+)?remind\s+(me|us|you)\s+(to\s+)?/i, "");
7
+ text = text.replace(/^remember\s+to\s+/i, "");
8
+ text = text.replace(/^(请)?(提醒我|提醒你|提醒|记得)(一下|一声)?[::,\s]*/u, "");
9
+ const normalized = text.trim();
10
+ return normalized.length > 0 ? normalized : raw.trim();
11
+ }
12
+ function inferReminderMessageFromTopic(topic) {
13
+ const trimmed = topic?.trim();
14
+ if (!trimmed)
15
+ return undefined;
16
+ if (!REMINDER_HINT_RE.test(trimmed))
17
+ return undefined;
18
+ if (RESEARCH_HINT_RE.test(trimmed))
19
+ return undefined;
20
+ return normalizeReminderText(trimmed);
21
+ }
22
+ function shouldPromoteMessageToResearchTopic(message) {
23
+ const trimmed = message.trim();
24
+ if (!trimmed)
25
+ return false;
26
+ if (!RESEARCH_HINT_RE.test(trimmed))
27
+ return false;
28
+ if (RESEARCH_WORKFLOW_VERB_RE.test(trimmed))
29
+ return true;
30
+ return trimmed.length >= 24;
31
+ }
32
+ function deriveResearchTopicFromMessage(message) {
33
+ let text = message.trim();
34
+ text = text.replace(/^scheduled reminder task\.?\s*/i, "");
35
+ text = text.replace(/^please send this reminder now:\s*/i, "");
36
+ text = text.replace(/^["']|["']$/g, "");
37
+ text = text.replace(/^这是一个.{0,24}提醒[::,,\s]*/u, "");
38
+ text = text.replace(/^这是一条.{0,24}提醒[::,,\s]*/u, "");
39
+ text = text.replace(/^提醒(?:我|你)?(?:一下|一声)?[::,,\s]*/u, "");
40
+ text = text.replace(/^请(?:你)?(?:检查|查看|关注)\s*/u, "");
41
+ text = text.replace(/[。.!]+$/u, "");
42
+ const normalized = text.trim();
43
+ return normalized.length > 0 ? normalized : message.trim();
44
+ }
45
+ function buildPreferencePayload(options) {
46
+ const maxPapers = options.maxPapers ?? 3;
47
+ const normalizedSources = options.sources?.map((item) => item.trim().toLowerCase()).filter(Boolean);
48
+ return {
49
+ max_papers: Math.max(1, Math.min(20, Math.floor(maxPapers))),
50
+ ...(options.recencyDays ? { recency_days: options.recencyDays } : {}),
51
+ ...(normalizedSources && normalizedSources.length > 0 ? { sources: [...new Set(normalizedSources)] } : {}),
52
+ };
53
+ }
54
+ export function buildScheduledTaskMessage(options, scheduleKind, scopeKey) {
55
+ const customMessage = options.message?.trim();
56
+ const promotedTopic = !options.topic && customMessage && shouldPromoteMessageToResearchTopic(customMessage)
57
+ ? deriveResearchTopicFromMessage(customMessage)
58
+ : undefined;
59
+ if (customMessage && !promotedTopic) {
60
+ return [
61
+ "Scheduled reminder task.",
62
+ `Please send this reminder now: \"${customMessage}\"`,
63
+ "Keep the reminder concise and do not run a research workflow unless explicitly requested.",
64
+ ].join("\n");
65
+ }
66
+ const reminderFromTopic = inferReminderMessageFromTopic(options.topic);
67
+ if (reminderFromTopic) {
68
+ return [
69
+ "Scheduled reminder task.",
70
+ `Please send this reminder now: \"${reminderFromTopic}\"`,
71
+ "Keep the reminder concise and do not run a research workflow unless explicitly requested.",
72
+ ].join("\n");
73
+ }
74
+ const trimmedTopic = (options.topic ?? promotedTopic)?.trim();
75
+ if (!trimmedTopic) {
76
+ return DEFAULT_CRON_PROMPT;
77
+ }
78
+ const preferences = buildPreferencePayload(options);
79
+ const candidatePool = resolveCandidatePool(options.candidatePool, preferences.max_papers);
80
+ const scoreWeights = options.scoreWeights ?? DEFAULT_SCORE_WEIGHTS;
81
+ const scoreWeightsText = formatScoreWeights(scoreWeights);
82
+ const preparePayload = JSON.stringify({
83
+ action: "prepare",
84
+ scope: scopeKey,
85
+ topic: trimmedTopic,
86
+ preferences,
87
+ });
88
+ const recordPaperTemplate = [
89
+ {
90
+ id: "arxiv:2501.12345",
91
+ title: "Paper title",
92
+ url: "https://arxiv.org/abs/2501.12345",
93
+ score: 92,
94
+ reason: "High topical relevance and strong authority.",
95
+ },
96
+ {
97
+ id: "doi:10.1000/xyz123",
98
+ title: "Paper title 2",
99
+ url: "https://doi.org/10.1000/xyz123",
100
+ score: 88,
101
+ reason: "Novel method with clear practical impact.",
102
+ },
103
+ ];
104
+ const recordTemplate = JSON.stringify({
105
+ action: "record",
106
+ scope: scopeKey,
107
+ topic: trimmedTopic,
108
+ status: "ok",
109
+ papers: recordPaperTemplate,
110
+ });
111
+ const recordFallbackTemplate = JSON.stringify({
112
+ action: "record",
113
+ scope: scopeKey,
114
+ topic: trimmedTopic,
115
+ status: "fallback_representative",
116
+ papers: recordPaperTemplate,
117
+ note: "No unseen papers this cycle; delivered best representative papers instead.",
118
+ });
119
+ const recordEmptyTemplate = JSON.stringify({
120
+ action: "record",
121
+ scope: scopeKey,
122
+ topic: trimmedTopic,
123
+ status: "empty",
124
+ papers: [],
125
+ note: "No suitable paper found in incremental pass and fallback representative pass.",
126
+ });
127
+ if (scheduleKind === "at") {
128
+ return [
129
+ `/research-pipeline Run a focused literature study on \"${trimmedTopic}\" and return up to ${preferences.max_papers} high-value representative papers.`,
130
+ "",
131
+ "Mandatory workflow:",
132
+ `1) Call tool \`scientify_literature_state\` with: ${preparePayload}`,
133
+ "2) Read `memory_hints` from prepare result. Treat preferred keywords/sources as positive ranking priors, and avoided ones as negative priors.",
134
+ `3) Build a candidate pool of around ${candidatePool} papers when possible, matching returned preferences (sources/recency).`,
135
+ `4) Score each candidate with weighted dimensions (${scoreWeightsText}). Each dimension is 0-100, then compute weighted average score.`,
136
+ `5) Apply memory prior adjustment to the score (up-rank preferred keyword/source matches; down-rank avoided matches).`,
137
+ `6) Select top ${preferences.max_papers} papers, then call \`scientify_literature_state\` to persist selected papers (include score/reason) using this JSON shape: ${recordTemplate}`,
138
+ "7) In user-facing output, do not display score/reason unless explicitly requested. Show only conclusions and source links.",
139
+ "8) If nothing suitable is found, still call record with empty papers using:",
140
+ `${recordEmptyTemplate}`,
141
+ "Then respond: `No new literature found.`",
142
+ ].join("\n");
143
+ }
144
+ return [
145
+ `/research-pipeline Run an incremental literature check focused on \"${trimmedTopic}\".`,
146
+ "",
147
+ "Mandatory workflow:",
148
+ `1) Call tool \`scientify_literature_state\` with: ${preparePayload}`,
149
+ "2) Read `memory_hints` from prepare result. Use them as quiet personalization priors in ranking (not user-facing).",
150
+ "3) Treat `exclude_paper_ids` as hard dedupe constraints. Do not push papers whose IDs are already in that list.",
151
+ `4) Incremental pass: build a candidate pool of around ${candidatePool} unseen papers when possible, following preferences (sources/recency).`,
152
+ `5) Score each candidate with weighted dimensions (${scoreWeightsText}). Each dimension is 0-100, then compute weighted average score.`,
153
+ "6) Apply memory prior adjustment to the score (up-rank preferred keyword/source matches; down-rank avoided matches).",
154
+ `7) Select at most ${preferences.max_papers} top-ranked unseen papers. If selected > 0, call \`scientify_literature_state\` with status \`ok\` using: ${recordTemplate}`,
155
+ "8) If incremental selection is empty, run one fallback representative pass (ignore `exclude_paper_ids` once) and select best representative papers.",
156
+ `9) If fallback returns papers, call \`scientify_literature_state\` with status \`fallback_representative\` using: ${recordFallbackTemplate}`,
157
+ "10) Output a compact progress report for this cycle: what changed, what matters, and a concrete plan for the next 1 hour.",
158
+ "11) Keep user-facing output concise; do not expose raw score/reason unless explicitly requested.",
159
+ "12) If both incremental and fallback passes are empty, call record with empty papers using:",
160
+ `${recordEmptyTemplate}`,
161
+ "Then still return a useful progress status with next-hour actions (instead of only a generic reminder).",
162
+ ].join("\n");
163
+ }
164
+ export function formatUsage() {
165
+ return [
166
+ "## Scientify Scheduled Subscription",
167
+ "",
168
+ "Examples:",
169
+ "- `/research-subscribe`",
170
+ "- `/research-subscribe daily 09:00 Asia/Shanghai`",
171
+ "- `/research-subscribe weekly mon 09:30 Asia/Shanghai`",
172
+ "- `/research-subscribe every 6h`",
173
+ "- `/research-subscribe at 2m`",
174
+ "- `/research-subscribe at 2026-03-04T08:00:00+08:00`",
175
+ "- `/research-subscribe cron \"0 9 * * 1\" Asia/Shanghai`",
176
+ "- `/research-subscribe daily 09:00 --channel feishu --to ou_xxx`",
177
+ "- `/research-subscribe every 2h --channel telegram --to 12345678`",
178
+ "- `/research-subscribe at 2m --channel webui`",
179
+ "- `/research-subscribe daily 08:00 --topic \"LLM alignment\"`",
180
+ "- `/research-subscribe daily 08:00 --topic \"LLM alignment\" --max-papers 5 --sources arxiv,openalex`",
181
+ "- `/research-subscribe daily 08:00 --topic \"LLM alignment\" --candidate-pool 12 --score-weights relevance:45,novelty:20,authority:25,actionability:10`",
182
+ "- `/research-subscribe at 1m --message \"Time to drink coffee.\"`",
183
+ "- `/research-subscribe daily 09:00 --no-deliver`",
184
+ ].join("\n");
185
+ }
186
+ export function withSignature(text) {
187
+ return `${text}\n${SCIENTIFY_SIGNATURE_FOOTER}`;
188
+ }
189
+ //# sourceMappingURL=prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../src/research-subscriptions/prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAGtE,MAAM,yBAAyB,GAC7B,iHAAiH,CAAC;AAEpH,SAAS,qBAAqB,CAAC,GAAW;IACxC,IAAI,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;IACtB,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,+CAA+C,EAAE,EAAE,CAAC,CAAC;IACzE,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;IAC9C,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,uCAAuC,EAAE,EAAE,CAAC,CAAC;IACjE,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;IAC/B,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;AACzD,CAAC;AAED,SAAS,6BAA6B,CAAC,KAAc;IACnD,M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AC;IACf,CAAC;IAED,OAAO;QACL,uEAAuE,YAAY,KAAK;QACxF,EAAE;QACF,qBAAqB;QACrB,qDAAqD,cAAc,EAAE;QACrE,oHAAoH;QACpH,iHAAiH;QACjH,yDAAyD,aAAa,wEAAwE;QAC9I,qDAAqD,gBAAgB,kEAAkE;QACvI,sHAAsH;QACtH,qBAAqB,WAAW,CAAC,UAAU,6GAA6G,cAAc,EAAE;QACxK,qJAAqJ;QACrJ,qHAAqH,sBAAsB,EAAE;QAC7I,2HAA2H;QAC3H,kGAAkG;QAClG,6FAA6F;QAC7F,GAAG,mBAAmB,EAAE;QACxB,yGAAyG;KAC1G,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,MAAM,UAAU,WAAW;IACzB,OAAO;QACL,qCAAqC;QACrC,EAAE;QACF,WAAW;QACX,yBAAyB;QACzB,mDAAmD;QACnD,wDAAwD;QACxD,kCAAkC;QAClC,+BAA+B;QAC/B,sDAAsD;QACtD,0DAA0D;QAC1D,kEAAkE;QAClE,mEAAmE;QACnE,+CAA+C;QAC/C,+DAA+D;QAC/D,uGAAuG;QACvG,yJAAyJ;QACzJ,mEAAmE;QACnE,kDAAkD;KACnD,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,GAAG,IAAI,KAAK,0BAA0B,EAAE,CAAC;AAClD,CAAC"}
@@ -0,0 +1,65 @@
1
+ import type { PluginLogger, PluginRuntime } from "openclaw";
2
+ export type ScheduleSpec = {
3
+ kind: "cron";
4
+ expr: string;
5
+ tz: string;
6
+ display: string;
7
+ } | {
8
+ kind: "every";
9
+ duration: string;
10
+ display: string;
11
+ } | {
12
+ kind: "at";
13
+ when: string;
14
+ display: string;
15
+ };
16
+ export type CronJob = {
17
+ id: string;
18
+ name?: string;
19
+ enabled?: boolean;
20
+ schedule?: {
21
+ kind?: string;
22
+ expr?: string;
23
+ tz?: string;
24
+ everyMs?: number;
25
+ at?: string;
26
+ };
27
+ delivery?: {
28
+ mode?: string;
29
+ channel?: string;
30
+ to?: string;
31
+ };
32
+ };
33
+ export type CronListResult = {
34
+ jobs?: CronJob[];
35
+ };
36
+ export type CronCommandDeps = {
37
+ runtime: PluginRuntime;
38
+ logger: PluginLogger;
39
+ };
40
+ export type DeliveryTarget = {
41
+ mode: "announce" | "none";
42
+ channel: string;
43
+ to?: string;
44
+ display: string;
45
+ };
46
+ export type ScoreWeights = {
47
+ relevance: number;
48
+ novelty: number;
49
+ authority: number;
50
+ actionability: number;
51
+ };
52
+ export type SubscriptionOptions = {
53
+ scheduleTokens: string[];
54
+ channelOverride?: string;
55
+ toOverride?: string;
56
+ noDeliver: boolean;
57
+ topic?: string;
58
+ message?: string;
59
+ maxPapers?: number;
60
+ recencyDays?: number;
61
+ sources?: string[];
62
+ candidatePool?: number;
63
+ scoreWeights?: ScoreWeights;
64
+ };
65
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/research-subscriptions/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE5D,MAAM,MAAM,YAAY,GACpB;IACE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB,GACD;IACE,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,GACD;IACE,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEN,MAAM,MAAM,OAAO,GAAG;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAA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;IACrB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/research-subscriptions/types.ts"],"names":[],"mappings":""}
@@ -1,10 +1,2 @@
1
- import type { PluginCommandContext, PluginCommandResult, PluginLogger, PluginRuntime } from "openclaw";
2
- type CronCommandDeps = {
3
- runtime: PluginRuntime;
4
- logger: PluginLogger;
5
- };
6
- export declare function createResearchSubscribeHandler(deps: CronCommandDeps): (ctx: PluginCommandContext) => Promise<PluginCommandResult>;
7
- export declare function createResearchUnsubscribeHandler(deps: CronCommandDeps): (ctx: PluginCommandContext) => Promise<PluginCommandResult>;
8
- export declare function createResearchSubscriptionsHandler(deps: CronCommandDeps): (ctx: PluginCommandContext) => Promise<PluginCommandResult>;
9
- export {};
1
+ export { createResearchSubscribeHandler, createResearchSubscriptionsHandler, createResearchUnsubscribeHandler, } from "./research-subscriptions/handlers.js";
10
2
  //# sourceMappingURL=research-subscriptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"research-subscriptions.d.ts","sourceRoot":"","sources":["../../src/research-subscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,mBAAmB,EACnB,YAAY,EACZ,aAAa,EAEd,MAAM,UAAU,CAAC;AAkGlB,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AAsmBF,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,eAAe,IACpD,KAAK,oBAAoB,KAAG,OAAO,CAAC,mBAAmB,CAAC,CA0IvE;AAED,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,eAAe,IACtD,KAAK,oBAAoB,KAAG,OAAO,CAAC,mBAAmB,CAAC,CA0CvE;AAED,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,eAAe,IACxD,KAAK,oBAAoB,KAAG,OAAO,CAAC,mBAAmB,CAAC,CAmCvE"}
1
+ {"version":3,"file":"research-subscriptions.d.ts","sourceRoot":"","sources":["../../src/research-subscriptions.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,kCAAkC,EAClC,gCAAgC,GACjC,MAAM,sCAAsC,CAAC"}