Updates
Rolling release / release (push) Failing after 2m11s

This commit is contained in:
2026-09-14 10:19:13 -04:00
parent a097adf4eb
commit ac5f18f79d
38 changed files with 1265 additions and 157 deletions
+33 -2
View File
@@ -39,10 +39,12 @@ function copyIfMissing(from, to) {
}
const OLD_AGENTS_BROWSER = '- `web_search` / `google_search` / `fetch_page` / `web_fetch` / `wiki_search` / `hn_search` / `code_search` — Playwright Chromium. For cookie walls or extra clicks, call `browser` with snapshot then click or type.';
const NEW_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\`.
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.`;
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 NEW_TOOLS_BROWSER = `- Public HTTP via curl or wget is blocked. Use \`web_search\` / \`web_fetch\` in the Jarvis Chromium window.
const MID_TOOLS_BROWSER = `- Public HTTP via curl or wget is blocked. Use \`web_search\` / \`web_fetch\` in the Jarvis Chromium window.
## Browser
@@ -52,6 +54,32 @@ const NEW_TOOLS_BROWSER = `- Public HTTP via curl or wget is blocked. Use \`web_
- \`browser\` actions: \`navigate\` + \`url\`, \`snapshot\`, \`click\`/\`type\` with \`ref\` from the last snapshot, \`press\` + \`key\`, \`scroll\` + \`dy\`, \`wait\` + \`ms\`.
- Snapshot or navigate before every click or type. Refs go stale after a click.
- Do not use \`cu_observe\` or the shell for websites.`;
const NEW_TOOLS_BROWSER = `- Public HTTP via curl or wget is blocked. Use \`browser\` in the Jarvis Chromium window.
## Browser
- \`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.
- \`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\`.
- Snapshot or navigate before every click or type. Refs go stale after a click.
- Do not use \`cu_observe\` or the shell for websites.`;
function rewriteBrowserSkill(dir) {
const file = path.join(dir, 'skills/browser/SKILL.md');
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;
fs.mkdirSync(path.dirname(file), { recursive: true });
fs.writeFileSync(file, fs.readFileSync(template, 'utf8'));
return true;
} catch {
return false;
}
}
function replaceOnce(file, from, to) {
try {
@@ -118,7 +146,10 @@ export function ensureAgentWorkspace({ name = 'Jarvis', prompt = '' } = {}) {
copyIfMissing(path.join(TEMPLATE_DIR, rel), path.join(dest, rel));
}
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, 'TOOLS.md'), OLD_TOOLS_BROWSER, NEW_TOOLS_BROWSER);
replaceOnce(path.join(dest, 'TOOLS.md'), MID_TOOLS_BROWSER, NEW_TOOLS_BROWSER);
rewriteBrowserSkill(dest);
applyAssistantName(dest, name);
applyAssistantPrompt(dest, prompt);
return dest;