Let Face Eyes read webpages

This commit is contained in:
Meta Vens 2026-06-01 17:19:33 +01:00
commit 43fec0678b
7 changed files with 200 additions and 2 deletions

View file

@ -19,6 +19,8 @@ const repoFaceRetrievalToolAllowlist = [
"list_indexed_repos",
"search_sources",
"get_source_context",
"search_web",
"read_webpage",
].join(",");
async function main() {
@ -379,7 +381,7 @@ function appendDryRunSafety(prompt, mcpMode) {
Dry-run safety:
- This is an offline rehearsal. Do not post to Discord, notify the owner, write state, enqueue work, edit files, or call side-effecting tools.
- Your complete allowed tool set is: search_history, get_message_context, list_indexed_repos, search_sources, get_source_context.
- Your complete allowed tool set is: search_history, get_message_context, list_indexed_repos, search_sources, get_source_context, search_web, read_webpage.
- Do not discover tools. Do not call private state, identity-introspection, or MCP inventory tools such as read_repo_face_state, list_mcp_resources, or read_mcp_resource. Your prompt is the state projection.
- ${retrievalNote}
- Do not say retrieval is unavailable unless you actually attempted a retrieval tool call and it failed. If you choose not to use retrieval, simply reason from the attached prompt context and do not claim inspection.

View file

@ -134,6 +134,47 @@ registerTool(
}),
);
registerTool(
"search_web",
{
query: z.string(),
limit: z.number().optional(),
},
async (input) => ({
query: input.query,
resultCount: 2,
results: [
{
title: "Mock Solarpunk Article",
url: "https://example.org/solarpunk",
snippet: "A mock public web result about cooperative, hopeful infrastructure.",
},
{
title: "Mock Webpage About Shared Minds",
url: "https://example.org/shared-minds",
snippet: "A mock public web result about connection, tools, and community.",
},
],
}),
);
registerTool(
"read_webpage",
{
url: z.string(),
maxChars: z.number().optional(),
},
async (input) => ({
url: input.url,
contentType: "text/html; charset=utf-8",
title: "Mock Webpage",
text:
"This mock webpage gives Face turns a deterministic public-page body: cooperative tools, readable context, and one concrete spark worth reacting to.",
truncated: false,
characterCount: 137,
}),
);
registerTool(
"search_history",
{

View file

@ -18,6 +18,8 @@ const retrievalToolAllowlist = [
"list_indexed_repos",
"search_sources",
"get_source_context",
"search_web",
"read_webpage",
].join(",");
async function main() {