@llamaventures/cli 1.4.2 → 1.4.3
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/bin/llama-mcp.mjs +36 -1
- package/bin/llama.mjs +11 -5
- package/package.json +1 -1
package/bin/llama-mcp.mjs
CHANGED
|
@@ -281,7 +281,8 @@ server.registerTool(
|
|
|
281
281
|
{
|
|
282
282
|
description:
|
|
283
283
|
"Search the Llama Ventures internal wiki — deal context, company profiles, " +
|
|
284
|
-
"industry frameworks, partner-curated knowledge."
|
|
284
|
+
"industry frameworks, partner-curated knowledge. Returns excerpts. " +
|
|
285
|
+
"For full article content use `wiki_read`.",
|
|
285
286
|
inputSchema: {
|
|
286
287
|
q: z.string().describe("search query"),
|
|
287
288
|
},
|
|
@@ -289,6 +290,40 @@ server.registerTool(
|
|
|
289
290
|
async ({ q }) => callApi("GET", `/api/wiki/search?q=${encodeURIComponent(q)}`)
|
|
290
291
|
);
|
|
291
292
|
|
|
293
|
+
server.registerTool(
|
|
294
|
+
"wiki_read",
|
|
295
|
+
{
|
|
296
|
+
description:
|
|
297
|
+
"Read a single wiki article from the configured Llama Command " +
|
|
298
|
+
"deployment by exact slug. Returns title, frontmatter, full " +
|
|
299
|
+
"markdown content, and rendered HTML.\n\n" +
|
|
300
|
+
"USE THIS — DO NOT WebFetch — whenever the user gives you a " +
|
|
301
|
+
"wiki URL whose path is `/wiki/<slug>`. Extract the slug from " +
|
|
302
|
+
"the URL path and call this tool with it. WebFetch against the " +
|
|
303
|
+
"browser URL goes through session-cookie auth — your agent " +
|
|
304
|
+
"doesn't have one — so it will look like a permission denial " +
|
|
305
|
+
"even though your token is fine.\n\n" +
|
|
306
|
+
"If you only have a topic name, use `wiki_search` first to " +
|
|
307
|
+
"find the slug.",
|
|
308
|
+
inputSchema: {
|
|
309
|
+
slug: z
|
|
310
|
+
.string()
|
|
311
|
+
.describe(
|
|
312
|
+
"exact kebab-case slug — the last path segment of the wiki URL"
|
|
313
|
+
),
|
|
314
|
+
lang: z
|
|
315
|
+
.enum(["en", "zh"])
|
|
316
|
+
.optional()
|
|
317
|
+
.describe("article language (default 'en')"),
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
async ({ slug, lang }) =>
|
|
321
|
+
callApi(
|
|
322
|
+
"GET",
|
|
323
|
+
`/api/wiki/${encodeURIComponent(slug)}?lang=${lang === "zh" ? "zh" : "en"}`
|
|
324
|
+
)
|
|
325
|
+
);
|
|
326
|
+
|
|
292
327
|
server.registerTool(
|
|
293
328
|
"wiki_save",
|
|
294
329
|
{
|
package/bin/llama.mjs
CHANGED
|
@@ -1218,12 +1218,18 @@ https://command.llamaventures.vc/settings/tokens, run
|
|
|
1218
1218
|
}
|
|
1219
1219
|
|
|
1220
1220
|
// ----- Wiki: read a single article (EN by default) -----
|
|
1221
|
+
// Hits /api/wiki/<slug> directly. Earlier versions did a fuzzy
|
|
1222
|
+
// /api/wiki/search call and filtered for an exact slug match — that
|
|
1223
|
+
// missed any article whose slug-as-string didn't appear in title or
|
|
1224
|
+
// content (e.g. "jack-feng" search vs "Jack Feng" content), so a real
|
|
1225
|
+
// article would print as "not found" even though it existed.
|
|
1221
1226
|
if (area === "wiki" && action === "read") {
|
|
1222
|
-
const
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
const
|
|
1226
|
-
|
|
1227
|
+
const { flags, positional } = parseFlags(rest);
|
|
1228
|
+
const slug = positional[0];
|
|
1229
|
+
if (!slug) throw new Error("Usage: llama wiki read <slug> [--lang en|zh]");
|
|
1230
|
+
const lang = flags.lang === "zh" ? "zh" : "en";
|
|
1231
|
+
const path = `/api/wiki/${encodeURIComponent(slug)}?lang=${lang}`;
|
|
1232
|
+
print(await request("GET", path));
|
|
1227
1233
|
return;
|
|
1228
1234
|
}
|
|
1229
1235
|
|