@jcode.labs/ragmir 2.17.0 → 2.17.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 (94) hide show
  1. package/README.md +37 -178
  2. package/dist/access-log.d.ts +1 -0
  3. package/dist/access-log.d.ts.map +1 -1
  4. package/dist/access-log.js +57 -24
  5. package/dist/access-log.js.map +1 -1
  6. package/dist/client.d.ts +3 -3
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/client.js +4 -4
  9. package/dist/client.js.map +1 -1
  10. package/dist/config.js +6 -14
  11. package/dist/config.js.map +1 -1
  12. package/dist/context-resources.d.ts +3 -3
  13. package/dist/context-resources.d.ts.map +1 -1
  14. package/dist/context-resources.js +13 -4
  15. package/dist/context-resources.js.map +1 -1
  16. package/dist/destroy.js +2 -2
  17. package/dist/destroy.js.map +1 -1
  18. package/dist/doctor.d.ts +2 -2
  19. package/dist/doctor.d.ts.map +1 -1
  20. package/dist/doctor.js +11 -3
  21. package/dist/doctor.js.map +1 -1
  22. package/dist/embeddings.d.ts +4 -0
  23. package/dist/embeddings.d.ts.map +1 -1
  24. package/dist/embeddings.js +68 -9
  25. package/dist/embeddings.js.map +1 -1
  26. package/dist/evaluate.d.ts +5 -0
  27. package/dist/evaluate.d.ts.map +1 -1
  28. package/dist/evaluate.js +50 -9
  29. package/dist/evaluate.js.map +1 -1
  30. package/dist/files.d.ts +3 -10
  31. package/dist/files.d.ts.map +1 -1
  32. package/dist/files.js +49 -15
  33. package/dist/files.js.map +1 -1
  34. package/dist/ingest.d.ts +2 -2
  35. package/dist/ingest.d.ts.map +1 -1
  36. package/dist/ingest.js +21 -16
  37. package/dist/ingest.js.map +1 -1
  38. package/dist/ingestion-state.d.ts +1 -0
  39. package/dist/ingestion-state.d.ts.map +1 -1
  40. package/dist/ingestion-state.js +89 -25
  41. package/dist/ingestion-state.js.map +1 -1
  42. package/dist/mcp-output.d.ts +14 -0
  43. package/dist/mcp-output.d.ts.map +1 -1
  44. package/dist/mcp-output.js +121 -0
  45. package/dist/mcp-output.js.map +1 -1
  46. package/dist/mcp.d.ts +8 -0
  47. package/dist/mcp.d.ts.map +1 -1
  48. package/dist/mcp.js +362 -116
  49. package/dist/mcp.js.map +1 -1
  50. package/dist/ocr.d.ts.map +1 -1
  51. package/dist/ocr.js +6 -12
  52. package/dist/ocr.js.map +1 -1
  53. package/dist/operation.d.ts.map +1 -1
  54. package/dist/operation.js +3 -2
  55. package/dist/operation.js.map +1 -1
  56. package/dist/parsing.d.ts +1 -0
  57. package/dist/parsing.d.ts.map +1 -1
  58. package/dist/parsing.js +86 -27
  59. package/dist/parsing.js.map +1 -1
  60. package/dist/project-config-file.d.ts +11 -0
  61. package/dist/project-config-file.d.ts.map +1 -0
  62. package/dist/project-config-file.js +55 -0
  63. package/dist/project-config-file.js.map +1 -0
  64. package/dist/query.d.ts.map +1 -1
  65. package/dist/query.js +12 -4
  66. package/dist/query.js.map +1 -1
  67. package/dist/research.d.ts.map +1 -1
  68. package/dist/research.js +3 -2
  69. package/dist/research.js.map +1 -1
  70. package/dist/security.d.ts +2 -2
  71. package/dist/security.d.ts.map +1 -1
  72. package/dist/security.js +57 -21
  73. package/dist/security.js.map +1 -1
  74. package/dist/semantic-config.d.ts.map +1 -1
  75. package/dist/semantic-config.js +16 -20
  76. package/dist/semantic-config.js.map +1 -1
  77. package/dist/skill.d.ts +2 -13
  78. package/dist/skill.d.ts.map +1 -1
  79. package/dist/skill.js.map +1 -1
  80. package/dist/sources.d.ts.map +1 -1
  81. package/dist/sources.js +24 -40
  82. package/dist/sources.js.map +1 -1
  83. package/dist/store.d.ts.map +1 -1
  84. package/dist/store.js +12 -5
  85. package/dist/store.js.map +1 -1
  86. package/dist/types.d.ts +15 -3
  87. package/dist/types.d.ts.map +1 -1
  88. package/dist/version.d.ts +1 -1
  89. package/dist/version.js +1 -1
  90. package/package.json +7 -6
  91. package/skills/ragmir/SKILL.md +5 -3
  92. package/skills/ragmir-audio-summary/listening-style.md +11 -11
  93. package/skills/ragmir-audio-summary/narration-templates.md +22 -22
  94. package/skills/ragmir-audio-summary/split-lines.py +2 -1
@@ -6,7 +6,7 @@ tables, SSML, or XML tags. The skeletons below only shape how you order and conn
6
6
  write the spoken text.
7
7
 
8
8
  Pick the format chosen in the skill, then fill the skeleton with the evidence that serves the user's
9
- intent. Drop anything that does not serve the intent — that is how you avoid superfluous data.
9
+ intent. Drop anything that does not serve the intent. That is how you avoid superfluous data.
10
10
 
11
11
  ## Format Selection Recap
12
12
 
@@ -24,11 +24,11 @@ Length follows relevant material. Never pad.
24
24
 
25
25
  Spoken-prose shape (write it as one flowing passage, not as headings):
26
26
 
27
- 1. **Hook + intent** — one sentence naming the subject and why the listener asked.
28
- 2. **Key idea** — the single thing to remember, stated up front (primacy).
29
- 3. **Evidence** — one short, plain-language reason or fact that supports it.
30
- 4. **Uncertainty / caveat** — one sentence if the evidence is partial or stale; omit only if solid.
31
- 5. **Recap + recall** — restate the key idea in other words, then ask one active-recall question,
27
+ 1. **Hook + intent**: one sentence naming the subject and why the listener asked.
28
+ 2. **Key idea**: the single thing to remember, stated up front (primacy).
29
+ 3. **Evidence**: one short, plain-language reason or fact that supports it.
30
+ 4. **Uncertainty / caveat**: one sentence if the evidence is partial or stale; omit only if solid.
31
+ 5. **Recap + recall**: restate the key idea in other words, then ask one active-recall question,
32
32
  pause with `…`, and give the answer.
33
33
 
34
34
  Abstract example (do not copy the words, follow the shape):
@@ -46,16 +46,16 @@ Abstract example (do not copy the words, follow the shape):
46
46
  The standard brief follows Barbara Minto's pyramid: answer first, then supporting points, then
47
47
  recap. Wrap it in a short Situation-Complication-Question-Answer opening.
48
48
 
49
- 1. **Situation** — one or two sentences framing the context the listener already shares.
50
- 2. **Complication** — the tension, change, or question that prompted the summary.
51
- 3. **Question** — the explicit question the summary answers.
52
- 4. **Answer (the key message)** — the one-to-three points to retain, stated first (primacy).
53
- 5. **Developed points** — each of the two-to-four points expanded in plain speech, grouped with
49
+ 1. **Situation**: one or two sentences framing the context the listener already shares.
50
+ 2. **Complication**: the tension, change, or question that prompted the summary.
51
+ 3. **Question**: the explicit question the summary answers.
52
+ 4. **Answer (the key message)**: the one-to-three points to retain, stated first (primacy).
53
+ 5. **Developed points**: each of the two-to-four points expanded in plain speech, grouped with
54
54
  signposting ("D'abord…, Ensuite…, Enfin…"). Proven facts only; separate from inference.
55
- 6. **Uncertainty, risks, decisions, missing documents** — a short passage on what is not yet
55
+ 6. **Uncertainty, risks, decisions, missing documents**: a short passage on what is not yet
56
56
  settled or needs action.
57
- 7. **Recap** — restate the two-to-four key points in compressed form (recency).
58
- 8. **Active recall** — two or three recall questions, each followed by a `…` pause and the answer.
57
+ 7. **Recap**: restate the two-to-four key points in compressed form (recency).
58
+ 8. **Active recall**: two or three recall questions, each followed by a `…` pause and the answer.
59
59
 
60
60
  Abstract example (shape only):
61
61
 
@@ -75,17 +75,17 @@ Abstract example (shape only):
75
75
  Use only when the material genuinely has several distinct facets. Each chapter is a self-contained
76
76
  mini-brief with its own mini-recap, so a listener can step away and come back.
77
77
 
78
- 1. **Promise** — what the whole audio covers and the three-to-five landmarks to listen for. State
78
+ 1. **Promise**: what the whole audio covers and the three-to-five landmarks to listen for. State
79
79
  the key message of the whole dossier up front.
80
- 2. **Chapter 1** — signpost the chapter ("Premier point: …"). Give its mini pyramid
80
+ 2. **Chapter 1**: signpost the chapter ("Premier point: …"). Give its mini pyramid
81
81
  (answer → evidence → caveat), then a one-sentence mini-recap.
82
- 3. **Chapter 2** — same shape, explicit transition ("Deuxième point: …").
82
+ 3. **Chapter 2**: same shape, explicit transition ("Deuxième point: …").
83
83
  4. **Continue** for each facet. Keep chapters balanced in length; merge thin ones.
84
- 5. **Global recap** — compress the key message of every chapter into one flowing passage (recency).
85
- 6. **Active recall** — three to five recall questions across the chapters, each with a `…` pause
84
+ 5. **Global recap**: compress the key message of every chapter into one flowing passage (recency).
85
+ 6. **Active recall**: three to five recall questions across the chapters, each with a `…` pause
86
86
  and the answer. Spread the questions across chapters, not only the last one.
87
87
 
88
- Transitions between chapters are essential in long audio — see the signposting catalogue below.
88
+ Transitions between chapters are essential in long audio. See the signposting catalogue below.
89
89
 
90
90
  Abstract shape:
91
91
 
@@ -117,7 +117,7 @@ transitions instead of lists or headings.
117
117
  | Recall question | "Question: …? … [answer]" |
118
118
 
119
119
  When enumerating, say the count first ("trois points") then speak each one with "D'abord / Ensuite /
120
- Enfin" — never read a literal list.
120
+ Enfin". Never read a literal list.
121
121
 
122
122
  ---
123
123
 
@@ -144,7 +144,7 @@ choice, no "est-ce que c'est X?" with the answer embedded).
144
144
  - After the question mark, insert `…` so the TTS pause gives the listener a beat to answer silently,
145
145
  then state the answer in the fewest words possible.
146
146
  - Do not reveal the answer inside the question. "Le préavis est-il de trente jours?" leaks the
147
- answer — prefer "Quelle est la durée du préavis?".
147
+ answer. Prefer "Quelle est la durée du préavis?".
148
148
 
149
149
  ---
150
150
 
@@ -5,7 +5,8 @@ Used to render long narrations sentence-by-sentence when an engine benefits from
5
5
  import re
6
6
  import sys
7
7
 
8
- raw = open(sys.argv[1], encoding="utf-8").read()
8
+ with open(sys.argv[1], encoding="utf-8") as source:
9
+ raw = source.read()
9
10
  text = re.sub(r"\s+", " ", raw).strip()
10
11
  for part in re.split(r"(?<=[.!?…])\s+", text):
11
12
  part = part.strip()