easyoref 1.14.2 → 1.15.1

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 (40) hide show
  1. package/dist/agent/clarify.js +1 -1
  2. package/dist/agent/clarify.js.map +1 -1
  3. package/dist/agent/extract.d.ts +48 -0
  4. package/dist/agent/extract.d.ts.map +1 -0
  5. package/dist/agent/extract.js +375 -0
  6. package/dist/agent/extract.js.map +1 -0
  7. package/dist/agent/filters.d.ts +48 -0
  8. package/dist/agent/filters.d.ts.map +1 -0
  9. package/dist/agent/filters.js +124 -0
  10. package/dist/agent/filters.js.map +1 -0
  11. package/dist/agent/graph.d.ts +9 -93
  12. package/dist/agent/graph.d.ts.map +1 -1
  13. package/dist/agent/graph.js +110 -1118
  14. package/dist/agent/graph.js.map +1 -1
  15. package/dist/agent/helpers.d.ts +6 -0
  16. package/dist/agent/helpers.d.ts.map +1 -0
  17. package/dist/agent/helpers.js +15 -0
  18. package/dist/agent/helpers.js.map +1 -0
  19. package/dist/agent/message.d.ts +48 -0
  20. package/dist/agent/message.d.ts.map +1 -0
  21. package/dist/agent/message.js +353 -0
  22. package/dist/agent/message.js.map +1 -0
  23. package/dist/agent/store.d.ts +2 -0
  24. package/dist/agent/store.d.ts.map +1 -1
  25. package/dist/agent/store.js +12 -1
  26. package/dist/agent/store.js.map +1 -1
  27. package/dist/agent/types.d.ts +18 -0
  28. package/dist/agent/types.d.ts.map +1 -1
  29. package/dist/agent/types.js.map +1 -1
  30. package/dist/agent/vote.d.ts +13 -0
  31. package/dist/agent/vote.d.ts.map +1 -0
  32. package/dist/agent/vote.js +197 -0
  33. package/dist/agent/vote.js.map +1 -0
  34. package/dist/bot.js +1 -1
  35. package/dist/bot.js.map +1 -1
  36. package/dist/config.d.ts +5 -3
  37. package/dist/config.d.ts.map +1 -1
  38. package/dist/config.js +3 -2
  39. package/dist/config.js.map +1 -1
  40. package/package.json +1 -1
@@ -0,0 +1,124 @@
1
+ /**
2
+ * Deterministic pre-filters — zero LLM tokens.
3
+ *
4
+ * Filters out noise:
5
+ * - Pikud HaOref area list "простыни" (high comma count)
6
+ * - Summary/recap posts with timestamp patterns "(HH:MM)", "X минут"
7
+ * - IDF/Tsahal press releases (long official texts)
8
+ *
9
+ * Builds ChannelTracking structure for the LLM pipeline.
10
+ */
11
+ // ── Noise detectors ────────────────────────────────────
12
+ const OREF_LINK_RE = /oref\.org\.il/i;
13
+ const OREF_CHANNEL_RE = /pikud|פיקוד|oref/i;
14
+ const IDF_CHANNEL_RE = /idf|צה"?ל|tsahal/i;
15
+ /**
16
+ * Pikud HaOref "простыня" — area list with many commas.
17
+ */
18
+ function isAreaListNoise(text) {
19
+ if (OREF_LINK_RE.test(text))
20
+ return true;
21
+ const commaCount = (text.match(/,/g) || []).length;
22
+ return commaCount >= 8;
23
+ }
24
+ /**
25
+ * Summary/recap posts with timestamp patterns.
26
+ * Real-time intel doesn't contain multiple "(HH:MM)" timestamps
27
+ * or "X минут/минуты" duration references.
28
+ */
29
+ function isSummaryPost(text) {
30
+ // Multiple "(HH:MM)" timestamps in one post = recap/summary
31
+ const timeParenCount = (text.match(/\(\d{1,2}:\d{2}\)/g) || []).length;
32
+ if (timeParenCount >= 2)
33
+ return true;
34
+ // "X минуты" / "X минут" — Russian time duration references (recap formatting)
35
+ if (/\d+\s+минут[ыа]?\b/i.test(text))
36
+ return true;
37
+ return false;
38
+ }
39
+ /**
40
+ * IDF/Tsahal press releases — long official texts (>400 chars from IDF channels).
41
+ */
42
+ function isIdfPressRelease(channel, text) {
43
+ if (!IDF_CHANNEL_RE.test(channel))
44
+ return false;
45
+ return text.length > 400;
46
+ }
47
+ /**
48
+ * Combined noise filter. Returns true if post should be filtered OUT.
49
+ */
50
+ export function isNoise(post) {
51
+ // Pikud HaOref channels with long posts are area lists
52
+ if (OREF_CHANNEL_RE.test(post.channel) && post.text.length > 300)
53
+ return true;
54
+ // Area list spam (any channel)
55
+ if (isAreaListNoise(post.text))
56
+ return true;
57
+ // Summary/recap posts
58
+ if (isSummaryPost(post.text))
59
+ return true;
60
+ // IDF press releases
61
+ if (isIdfPressRelease(post.channel, post.text))
62
+ return true;
63
+ return false;
64
+ }
65
+ // ── Channel tracking structure ─────────────────────────
66
+ function toTrackedMessage(post) {
67
+ return {
68
+ timestamp: post.ts,
69
+ text: post.text,
70
+ url: post.messageUrl,
71
+ channel: post.channel,
72
+ };
73
+ }
74
+ /**
75
+ * Build ChannelTracking from session posts.
76
+ *
77
+ * Splits posts per channel into prev (already processed) and last (new).
78
+ * Applies deterministic noise filter on all posts.
79
+ * Only includes channels that have new (last) messages.
80
+ */
81
+ export function buildChannelTracking(posts, sessionStartTs, lastUpdateTs) {
82
+ const channelMap = new Map();
83
+ for (const post of posts) {
84
+ if (isNoise(post))
85
+ continue;
86
+ if (post.ts < sessionStartTs)
87
+ continue;
88
+ if (!channelMap.has(post.channel)) {
89
+ channelMap.set(post.channel, { prev: [], last: [] });
90
+ }
91
+ const bucket = channelMap.get(post.channel);
92
+ const msg = toTrackedMessage(post);
93
+ if (lastUpdateTs > 0 && post.ts <= lastUpdateTs) {
94
+ bucket.prev.push(msg);
95
+ }
96
+ else {
97
+ bucket.last.push(msg);
98
+ }
99
+ }
100
+ const channels_with_updates = [];
101
+ for (const [channel, { prev, last }] of channelMap) {
102
+ if (last.length > 0) {
103
+ channels_with_updates.push({
104
+ channel,
105
+ prev_tracked_messages: prev.sort((a, b) => a.timestamp - b.timestamp),
106
+ last_tracked_messages: last.sort((a, b) => a.timestamp - b.timestamp),
107
+ });
108
+ }
109
+ }
110
+ return {
111
+ track_start_timestamp: sessionStartTs,
112
+ last_update_timestamp: lastUpdateTs,
113
+ channels_with_updates,
114
+ };
115
+ }
116
+ // ── Exported for testing ───────────────────────────────
117
+ export const _test = {
118
+ isAreaListNoise,
119
+ isSummaryPost,
120
+ isIdfPressRelease,
121
+ isNoise,
122
+ toTrackedMessage,
123
+ };
124
+ //# sourceMappingURL=filters.js.map
@@ -0,0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AE,IAAI,YAAY,EAAE,CAAC;YAChD,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;IACH,CAAC;IAED,MAAM,qBAAqB,GAAyB,EAAE,CAAC;IACvD,KAAK,MAAM,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,IAAI,UAAU,EAAE,CAAC;QACnD,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpB,qBAAqB,CAAC,IAAI,CAAC;gBACzB,OAAO;gBACP,qBAAqB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,CAAC;gBACrE,qBAAqB,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,CAAC;aACtE,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO;QACL,qBAAqB,EAAE,cAAc;QACrC,qBAAqB,EAAE,YAAY;QACnC,qBAAqB;KACtB,CAAC;AACJ,CAAC;AAED,0DAA0D;AAE1D,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,eAAe;IACf,aAAa;IACb,iBAAiB;IACjB,OAAO;IACP,gBAAgB;CACR,CAAC"}
@@ -1,79 +1,18 @@
1
1
  /**
2
2
  * LangGraph.js enrichment pipeline — phase-aware, time-validated.
3
3
  *
4
- * KEY DESIGN PRINCIPLES:
5
- * 1. TIME IS KING every post is validated against the alert time window.
6
- * LLM receives alert time + post time and scores time_relevance.
7
- * Posts about previous/different attacks are rejected.
8
- * 2. PHASE-AWARE each phase extracts only what's relevant:
9
- * - early_warning: origin, ETA, rocket count, cassette
10
- * - siren: carries early data + adds interception, impacts
11
- * - resolved: carries all + adds casualties, injuries, final stats
12
- * 3. CARRY-FORWARD — results persist in Redis (EnrichmentData).
13
- * Each phase inherits previous phase's findings.
14
- * 4. INLINE CITATIONS — no superscripts, no footer sources.
15
- * Format: [[1]](url) right after each data point.
16
- * 5. DEDUP EDITS — hash-based check prevents "message not modified" spam.
4
+ * Lean orchestrator: connects filter → extract → vote → edit.
5
+ * All logic lives in dedicated modules:
6
+ * - filters.ts: deterministic noise filter, channel tracking
7
+ * - extract.ts: cheap LLM pre-filter, expensive extraction, post-filter
8
+ * - vote.ts: consensus voting (deterministic)
9
+ * - message.ts: message building, Telegram editing
10
+ * - helpers.ts: toIsraelTime, textHash
17
11
  *
18
12
  * Pipeline:
19
- * preFilterextractAndValidatepostFiltervote[clarify] → editMessage
13
+ * collectAndFilterextractvote[clarifyrevote] → editMessage
20
14
  */
21
- import { ChatOpenAI } from "@langchain/openai";
22
- import type { ChannelPost } from "./store.js";
23
- import type { AlertType, CitedSource, EnrichmentData, InlineCite, ValidatedExtraction, VotedResult } from "./types.js";
24
- declare const AgentState: import("@langchain/langgraph").AnnotationRoot<{
25
- alertId: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
26
- alertTs: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
27
- alertType: import("@langchain/langgraph").BaseChannel<AlertType, AlertType | import("@langchain/langgraph").OverwriteValue<AlertType>, unknown>;
28
- alertAreas: import("@langchain/langgraph").BaseChannel<string[], string[] | import("@langchain/langgraph").OverwriteValue<string[]>, unknown>;
29
- chatId: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
30
- messageId: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
31
- isCaption: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
32
- currentText: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
33
- channelPosts: import("@langchain/langgraph").BaseChannel<ChannelPost[], ChannelPost[] | import("@langchain/langgraph").OverwriteValue<ChannelPost[]>, unknown>;
34
- filteredPosts: import("@langchain/langgraph").BaseChannel<ChannelPost[], ChannelPost[] | import("@langchain/langgraph").OverwriteValue<ChannelPost[]>, unknown>;
35
- extractions: import("@langchain/langgraph").BaseChannel<ValidatedExtraction[], ValidatedExtraction[] | import("@langchain/langgraph").OverwriteValue<ValidatedExtraction[]>, unknown>;
36
- votedResult: import("@langchain/langgraph").BaseChannel<VotedResult | null, VotedResult | import("@langchain/langgraph").OverwriteValue<VotedResult | null> | null, unknown>;
37
- /** Tracks whether clarify has already run (prevents infinite loop) */
38
- clarifyAttempted: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
39
- /** Cross-phase enrichment data loaded at start */
40
- previousEnrichment: import("@langchain/langgraph").BaseChannel<EnrichmentData, EnrichmentData | import("@langchain/langgraph").OverwriteValue<EnrichmentData>, unknown>;
41
- /** Session start timestamp for time window calculations */
42
- sessionStartTs: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
43
- /** Phase start timestamp */
44
- phaseStartTs: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
45
- }>;
46
- type AgentStateType = typeof AgentState.State;
47
- declare function getLLM(): ChatOpenAI;
48
- declare function buildRegionKeywords(): string[];
49
- /** Format timestamp as HH:MM Israel time */
50
- declare function toIsraelTime(ts: number): string;
51
- /** MD5 hash for edit dedup */
52
- declare function textHash(text: string): string;
53
- /** Phase-specific extraction instructions */
54
- declare function getPhaseInstructions(alertType: AlertType): string;
55
- declare function postFilter(state: AgentStateType): Partial<AgentStateType>;
56
- declare function vote(state: AgentStateType): Partial<AgentStateType>;
57
- /** Format inline citations: [[1]](url), [[2]](url) */
58
- declare function inlineCites(indices: number[], citedSources: CitedSource[]): string;
59
- /** Get InlineCite[] from citation indices */
60
- declare function extractCites(indices: number[], citedSources: CitedSource[]): InlineCite[];
61
- /** Format inline citations from InlineCite[] (for carry-forward data) */
62
- declare function inlineCitesFromData(cites: InlineCite[]): string;
63
- /**
64
- * Build enrichment data from current vote + previous enrichment (carry-forward).
65
- * Returns updated EnrichmentData for Redis persistence.
66
- */
67
- declare function buildEnrichmentFromVote(r: VotedResult, prev: EnrichmentData, alertType: AlertType, alertTs: number): EnrichmentData;
68
- /**
69
- * Build the enriched message text from current message + enrichment data.
70
- * Uses inline [[1]](url) citations. No superscripts. No footer sources.
71
- */
72
- declare function buildEnrichedMessage(currentText: string, alertType: AlertType, alertTs: number, enrichment: EnrichmentData): string;
73
- /**
74
- * Insert a line before the time line (last "Время" / "Time" / "שעת" line).
75
- */
76
- declare function insertBeforeTimeLine(text: string, line: string): string;
15
+ import type { AlertType } from "./types.js";
77
16
  export interface RunEnrichmentInput {
78
17
  alertId: string;
79
18
  alertTs: number;
@@ -85,27 +24,4 @@ export interface RunEnrichmentInput {
85
24
  currentText: string;
86
25
  }
87
26
  export declare function runEnrichment(input: RunEnrichmentInput): Promise<void>;
88
- export declare const _test: {
89
- readonly getLLM: typeof getLLM;
90
- readonly buildRegionKeywords: typeof buildRegionKeywords;
91
- readonly LAUNCH_KEYWORDS: string[];
92
- readonly TIME_WINDOW_MS: Record<AlertType, number>;
93
- readonly toIsraelTime: typeof toIsraelTime;
94
- readonly textHash: typeof textHash;
95
- readonly postFilter: typeof postFilter;
96
- readonly vote: typeof vote;
97
- readonly buildEnrichmentFromVote: typeof buildEnrichmentFromVote;
98
- readonly buildEnrichedMessage: typeof buildEnrichedMessage;
99
- readonly insertBeforeTimeLine: typeof insertBeforeTimeLine;
100
- readonly inlineCites: typeof inlineCites;
101
- readonly inlineCitesFromData: typeof inlineCitesFromData;
102
- readonly extractCites: typeof extractCites;
103
- readonly COUNTRY_RU: Record<string, string>;
104
- readonly SYSTEM_PROMPT_BASE: "You analyze Telegram channel messages about a missile/rocket attack on Israel.\nYour job: extract factual data, assess quality, AND validate temporal relevance.\n\nCRITICAL — TIME VALIDATION:\nYou will receive the alert time and the post time. You MUST determine if this post\nis about the CURRENT attack or about a previous/different event.\n- If post discusses events clearly BEFORE the alert time → time_relevance=0\n- If post is generic military news not specific to this attack → time_relevance=0.2\n- If post discusses the current attack → time_relevance=1.0\n- If uncertain → time_relevance=0.5 (the system will use alert_history to verify)\n\nReturn ONLY valid JSON (no markdown, no explanation):\n{\n \"region_relevance\": float, // 0–1: does this message discuss the specified alert region?\n \"source_trust\": float, // 0–1: factual reporting (1.0) vs unverified rumors/panic (0.0)\n \"tone\": \"calm\"|\"neutral\"|\"alarmist\",\n \"time_relevance\": float, // 0–1: is this post about the CURRENT attack? (see rules above)\n \"country_origin\": string|null, // \"Iran\",\"Yemen\",\"Lebanon\",\"Gaza\",\"Iraq\",\"Syria\" or null\n \"rocket_count\": int|null,\n \"is_cassette\": bool|null,\n \"intercepted\": int|null,\n \"intercepted_qual\": \"all\"|\"most\"|\"many\"|\"few\"|\"exists\"|\"none\"|\"more_than\"|\"less_than\"|null,\n \"intercepted_qual_num\": int|null,\n \"sea_impact\": int|null,\n \"sea_impact_qual\": \"all\"|\"most\"|\"many\"|\"few\"|\"exists\"|\"none\"|\"more_than\"|\"less_than\"|null,\n \"sea_impact_qual_num\": int|null,\n \"open_area_impact\": int|null,\n \"open_area_impact_qual\": \"all\"|\"most\"|\"many\"|\"few\"|\"exists\"|\"none\"|\"more_than\"|\"less_than\"|null,\n \"open_area_impact_qual_num\": int|null,\n \"hits_confirmed\": int|null,\n \"casualties\": int|null,\n \"injuries\": int|null,\n \"eta_refined_minutes\": int|null,\n \"confidence\": float\n}\n\nRules:\n- If unrelated to the alert region, set region_relevance=0 and all data fields to null.\n- If message is speculative/unconfirmed rumor, set source_trust < 0.4.\n- If message uses excessive caps, exclamation marks, panic language → tone=\"alarmist\".\n- Only extract concrete numbers explicitly stated in the text. Never guess.\n- *_qual fields: use ONLY when NO exact count is given. If exact number present, set *_qual=null.\n- \"none\" qual is only valid if explicitly stated (e.g., \"все перехвачены\", \"не упало в море\").\n- For IDF (@idf_telegram) posts about ongoing operations (not this specific attack) → time_relevance=0.\n- LANGUAGE NEUTRALITY: Posts may be in Hebrew, Russian, Arabic, or English. The language of the post\n MUST NOT affect source_trust or confidence. Russian-language Israeli channels are equally reliable\n and often break news faster than Hebrew ones. Judge ONLY by factual content and tone.\n- TRUST INTERCEPTION & IMPACT REPORTS: When a channel explicitly states interception results\n (e.g., \"перехвачены\", \"intercepted\", \"יירוט\", \"упали в море\", \"fell in the sea\", \"נפלו בים\",\n \"open area impact\", \"שטח פתוח\"), trust these claims with source_trust >= 0.7 and confidence >= 0.7.\n Israeli Telegram channels often report interception results before official confirmation,\n and these reports are typically accurate. Do NOT downgrade these just because they lack official source.";
105
- readonly getPhaseInstructions: typeof getPhaseInstructions;
106
- readonly SKIP: 0.6;
107
- readonly UNCERTAIN: 0.75;
108
- readonly CERTAIN: 0.95;
109
- };
110
- export {};
111
27
  //# sourceMappingURL=graph.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/agent/graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAM/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAS9C,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,cAAc,EAEd,UAAU,EAEV,mBAAmB,EACnB,WAAW,EACZ,MAAM,YAAY,CAAC;AAKpB,QAAA,MAAM,UAAU;;;;;;;;;;;;;IAad,sEAAsE;;IAEtE,kDAAkD;;IAElD,2DAA2D;;IAE3D,4BAA4B;;EAE5B,CAAC;AAEH,KAAK,cAAc,GAAG,OAAO,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