roam-research-mcp 0.12.3 → 0.17.0
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/README.md +270 -1
- package/build/config/environment.js +44 -0
- package/build/index.js +1 -823
- package/build/markdown-utils.js +151 -37
- package/build/search/block-ref-search.js +72 -0
- package/build/search/hierarchy-search.js +105 -0
- package/build/search/index.js +7 -0
- package/build/search/status-search.js +43 -0
- package/build/search/tag-search.js +35 -0
- package/build/search/text-search.js +32 -0
- package/build/search/types.js +7 -0
- package/build/search/utils.js +98 -0
- package/build/server/roam-server.js +178 -0
- package/build/test-addMarkdownText.js +1 -1
- package/build/tools/schemas.js +317 -0
- package/build/tools/tool-handlers.js +972 -0
- package/build/types/roam.js +1 -0
- package/build/utils/helpers.js +19 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Helper function to get ordinal suffix for numbers (1st, 2nd, 3rd, etc.)
|
|
2
|
+
export function getOrdinalSuffix(n) {
|
|
3
|
+
const j = n % 10;
|
|
4
|
+
const k = n % 100;
|
|
5
|
+
if (j === 1 && k !== 11)
|
|
6
|
+
return "st";
|
|
7
|
+
if (j === 2 && k !== 12)
|
|
8
|
+
return "nd";
|
|
9
|
+
if (j === 3 && k !== 13)
|
|
10
|
+
return "rd";
|
|
11
|
+
return "th";
|
|
12
|
+
}
|
|
13
|
+
// Format date in Roam's preferred format (e.g., "January 1st, 2024")
|
|
14
|
+
export function formatRoamDate(date) {
|
|
15
|
+
const month = date.toLocaleDateString('en-US', { month: 'long' });
|
|
16
|
+
const day = date.getDate();
|
|
17
|
+
const year = date.getFullYear();
|
|
18
|
+
return `${month} ${day}${getOrdinalSuffix(day)}, ${year}`;
|
|
19
|
+
}
|