obsidian
Rolling release / release (push) Failing after 1m46s

This commit is contained in:
2026-09-14 11:24:10 -04:00
parent ac5f18f79d
commit aa06c71fe1
38 changed files with 1198 additions and 66 deletions
+23 -3
View File
@@ -42,7 +42,15 @@ const OLD_AGENTS_BROWSER = '- `web_search` / `google_search` / `fetch_page` / `w
const MID_AGENTS_BROWSER = `- Web tools share one headed Playwright Chromium window. \`web_search\` / \`google_search\` / \`wiki_search\` / \`hn_search\` / \`code_search\` find links. \`fetch_page\` / \`web_fetch\` read a public page. For cookie banners, forms, logins, or leftover challenges, call \`browser\`. Before a multi-step browse, \`read_file\` \`skills/browser/SKILL.md\`.
- \`browser\` actions: \`navigate\` (needs \`url\`), \`snapshot\`, \`click\` (\`ref\` from the last snapshot), \`type\` (\`ref\` + \`text\`, optional \`submit\`), \`press\` (\`key\`), \`scroll\` (\`dy\`), \`wait\` (\`ms\`). Snapshot or navigate first. Refs change after every click. Do not use \`cu_observe\` or the shell for websites.`;
const NEW_AGENTS_BROWSER = `- The only web tool is \`browser\`, the headed Jarvis Chromium window. \`web_search\`, \`web_fetch\`, and the other search tools are removed. Before a multi-step browse, \`read_file\` \`skills/browser/SKILL.md\`.
- \`browser\` actions: \`navigate\` (needs \`url\`; returns page text), \`snapshot\`, \`click\` (\`ref\` from the last snapshot), \`type\` (\`ref\` + \`text\`, optional \`submit\`), \`press\` (\`key\`), \`scroll\` (\`dy\`), \`wait\` (\`ms\`). To search, navigate to a public search url, then click a result ref. Snapshot or navigate first. Refs change after every click. Do not use \`cu_observe\` or the shell for websites.`;
- \`browser\` actions: \`navigate\` (needs \`url\`; returns page text), \`snapshot\`, \`click\` (\`ref\` from the last snapshot), \`type\` (\`ref\` + \`text\`, optional \`submit\`), \`press\` (\`key\`), \`scroll\` (\`dy\`), \`wait\` (\`ms\`). To search, navigate to DuckDuckGo (\`https://duckduckgo.com/?q=QUERY\`), then click a result ref. Snapshot or navigate first. Refs change after every click. Do not use \`cu_observe\` or the shell for websites.`;
const STARTPAGE_AGENTS_BROWSER = NEW_AGENTS_BROWSER.replace(
'To search, navigate to DuckDuckGo (`https://duckduckgo.com/?q=QUERY`), then click a result ref. ',
'To search, navigate to Startpage (`https://www.startpage.com/sp/search?query=QUERY&cat=web&language=english&lui=english&t=device&abe=1&abd=1&abp=1`), then click a result ref. Do not use DuckDuckGo or Google. '
);
const PREV_AGENTS_BROWSER = NEW_AGENTS_BROWSER.replace(
'To search, navigate to DuckDuckGo (`https://duckduckgo.com/?q=QUERY`), then click a result ref. ',
'To search, navigate to a public search url, then click a result ref. '
);
const OLD_TOOLS_BROWSER = '- Public HTTP via curl or wget is blocked. Use `web_search` / `web_fetch` in the Jarvis Chromium window. For cookie walls, call `browser` with snapshot then click or type.';
const MID_TOOLS_BROWSER = `- Public HTTP via curl or wget is blocked. Use \`web_search\` / \`web_fetch\` in the Jarvis Chromium window.
@@ -60,7 +68,7 @@ const NEW_TOOLS_BROWSER = `- Public HTTP via curl or wget is blocked. Use \`brow
- \`browser\` is the only web tool. It drives one headed Playwright Chromium window.
- \`web_search\`, \`google_search\`, \`fetch_page\`, \`web_fetch\`, \`wiki_search\`, \`hn_search\`, and \`code_search\` are removed. Do not call them.
- To search, \`navigate\` to a public search url, then \`click\` a result ref.
- To search, \`navigate\` to \`https://duckduckgo.com/?q=QUERY\`, then \`click\` a result ref.
- \`navigate\` and \`snapshot\` return page \`text\`. Read it, then decide the next action.
- Cookie walls, forms, leftover challenges: \`read_file\` \`skills/browser/SKILL.md\` for the playbook.
- \`browser\` actions: \`navigate\` + \`url\`, \`snapshot\`, \`click\`/\`type\` with \`ref\` from the last snapshot, \`press\` + \`key\`, \`scroll\` + \`dy\`, \`wait\` + \`ms\`.
@@ -72,7 +80,7 @@ function rewriteBrowserSkill(dir) {
const template = path.join(TEMPLATE_DIR, 'skills/browser/SKILL.md');
try {
const text = fs.readFileSync(file, 'utf8');
if (!/web_search|fetch_page|web_fetch/.test(text)) return false;
if (!/web_search|fetch_page|web_fetch|startpage\.com/.test(text) && /duckduckgo\.com\/\?q/.test(text) && /window stays open/.test(text)) return false;
fs.mkdirSync(path.dirname(file), { recursive: true });
fs.writeFileSync(file, fs.readFileSync(template, 'utf8'));
return true;
@@ -147,8 +155,20 @@ export function ensureAgentWorkspace({ name = 'Jarvis', prompt = '' } = {}) {
}
replaceOnce(path.join(dest, 'AGENTS.md'), OLD_AGENTS_BROWSER, NEW_AGENTS_BROWSER);
replaceOnce(path.join(dest, 'AGENTS.md'), MID_AGENTS_BROWSER, NEW_AGENTS_BROWSER);
replaceOnce(path.join(dest, 'AGENTS.md'), PREV_AGENTS_BROWSER, NEW_AGENTS_BROWSER);
replaceOnce(path.join(dest, 'AGENTS.md'), STARTPAGE_AGENTS_BROWSER, NEW_AGENTS_BROWSER);
replaceOnce(path.join(dest, 'TOOLS.md'), OLD_TOOLS_BROWSER, NEW_TOOLS_BROWSER);
replaceOnce(path.join(dest, 'TOOLS.md'), MID_TOOLS_BROWSER, NEW_TOOLS_BROWSER);
replaceOnce(
path.join(dest, 'TOOLS.md'),
'- To search, `navigate` to a public search url, then `click` a result ref.',
'- To search, `navigate` to `https://duckduckgo.com/?q=QUERY`, then `click` a result ref.',
);
replaceOnce(
path.join(dest, 'TOOLS.md'),
'- To search, `navigate` to `https://www.startpage.com/sp/search?query=QUERY&cat=web&language=english&lui=english&t=device&abe=1&abd=1&abp=1`, then `click` a result ref. Do not use DuckDuckGo or Google.',
'- To search, `navigate` to `https://duckduckgo.com/?q=QUERY`, then `click` a result ref.',
);
rewriteBrowserSkill(dest);
applyAssistantName(dest, name);
applyAssistantPrompt(dest, prompt);