openalmanac 0.3.3 → 0.3.5
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/tools/research.js +2 -1
- package/dist/tools/topics.js +28 -0
- package/package.json +1 -1
package/dist/tools/research.js
CHANGED
|
@@ -86,13 +86,14 @@ export function registerResearchTools(server) {
|
|
|
86
86
|
name: "read_webpage",
|
|
87
87
|
description: "Fetch a URL and return its content as markdown. Routes automatically based on URL:\n" +
|
|
88
88
|
"- **Reddit threads** (reddit.com/r/{sub}/comments/{id}/...) — returns the post plus top-level threaded comments with scores and authors, via a residential proxy.\n" +
|
|
89
|
+
"- **Reddit wiki pages** (reddit.com/r/{sub}/wiki/...) — returns the wiki page as markdown with revision metadata.\n" +
|
|
89
90
|
"- **YouTube videos** — returns title, description, transcript when available.\n" +
|
|
90
91
|
"- **PDFs** — extracts text.\n" +
|
|
91
92
|
"- **LinkedIn posts/profiles** — uses the LinkedIn scraper.\n" +
|
|
92
93
|
"- **Everything else** — generic web scrape with Firecrawl/Jina fallback.\n\n" +
|
|
93
94
|
"Requires API key. Rate limit: 5/min.",
|
|
94
95
|
parameters: z.object({
|
|
95
|
-
url: z.string().url().describe("Full URL to read. For Reddit threads, use
|
|
96
|
+
url: z.string().url().describe("Full URL to read. For Reddit threads, use reddit.com/r/{sub}/comments/{id}/...; for Reddit wikis, use reddit.com/r/{sub}/wiki/... ."),
|
|
96
97
|
max_length: z
|
|
97
98
|
.number()
|
|
98
99
|
.int()
|
package/dist/tools/topics.js
CHANGED
|
@@ -46,6 +46,34 @@ export function registerTopicTools(server) {
|
|
|
46
46
|
return JSON.stringify(await resp.json(), null, 2);
|
|
47
47
|
},
|
|
48
48
|
});
|
|
49
|
+
server.addTool({
|
|
50
|
+
name: "update_topic",
|
|
51
|
+
description: "Update a topic's title, description, or image. Requires wiki moderator role.",
|
|
52
|
+
parameters: z.object({
|
|
53
|
+
wiki_slug: z.string().describe("Wiki slug"),
|
|
54
|
+
topic_slug: z.string().describe("Slug of the topic to update"),
|
|
55
|
+
title: z.string().optional().describe("New title (also updates slug)"),
|
|
56
|
+
description: z.string().optional().describe("New description"),
|
|
57
|
+
image_url: z
|
|
58
|
+
.string()
|
|
59
|
+
.url()
|
|
60
|
+
.max(2048)
|
|
61
|
+
.nullable()
|
|
62
|
+
.optional()
|
|
63
|
+
.describe("Topic image URL (https:// or http://). Pass null to clear."),
|
|
64
|
+
}),
|
|
65
|
+
async execute({ wiki_slug, topic_slug, title, description, image_url }) {
|
|
66
|
+
const body = {};
|
|
67
|
+
if (title !== undefined)
|
|
68
|
+
body.title = title;
|
|
69
|
+
if (description !== undefined)
|
|
70
|
+
body.description = description;
|
|
71
|
+
if (image_url !== undefined)
|
|
72
|
+
body.image_url = image_url;
|
|
73
|
+
const resp = await request("PATCH", `/api/w/${wiki_slug}/topics/${topic_slug}`, { auth: true, json: body });
|
|
74
|
+
return JSON.stringify(await resp.json(), null, 2);
|
|
75
|
+
},
|
|
76
|
+
});
|
|
49
77
|
server.addTool({
|
|
50
78
|
name: "create_topics_batch",
|
|
51
79
|
description: "Batch create topics in a wiki. Useful for bootstrapping a topic hierarchy. Requires wiki membership.",
|