The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
feat(jev-browser): two boxes (#150)
Deeb537685aa251
diff --git a/store/agents/jev-browser/store.json b/store/agents/jev-browser/store.jsonindex 426536f20..94459f184 100644--- a/store/agents/jev-browser/store.json+++ b/store/agents/jev-browser/store.json@@ -2,12 +2,12 @@"homepage": "https://typesafe.ai","upstream": "https://typesafe.ai","license": "MIT",- "tagline": "An address and a sentence. Jev works out the columns and fills the sheet",+ "tagline": "Name a site, say what you want, and get a spreadsheet","examples": [{- "prompt": "Here is the search results page for two-bedroom flats in my area. Get me every listing with its address, monthly rent, how many bedrooms, and whether it says pets are allowed. Then tell me which five are the best value.",- "image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-browser/jev-picks-the-columns.jpg",- "caption": "No columns were typed. Jev read one page and chose them in about a second"+ "prompt": "books.toscrape.com — travel books, with the price and whether they are in stock. Then tell me which are running low.",+ "image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-browser/two-boxes.jpg",+ "caption": "Two boxes. Jev finds the page, picks the columns and fills the sheet"},{"prompt": "Read every product in this category and put the name, price, stock count and product code in a spreadsheet. Stop after 40. Then tell me which ones are out of stock.",diff --git a/store/agents/jev-browser/template/browse.json b/store/agents/jev-browser/template/browse.jsonindex 707650df6..d6dd14366 100644--- a/store/agents/jev-browser/template/browse.json+++ b/store/agents/jev-browser/template/browse.json@@ -1,9 +1,8 @@{- "task": "",- "start": "demo",- "want": "what each one is called, what it pays and where it is",- "maxItems": 12,- "maxPages": 4,+ "start": "",+ "want": "",+ "maxItems": 25,+ "maxPages": 5,"sameSiteOnly": true,"show": true}diff --git a/store/agents/jev-browser/test/viewer.test.mjs b/store/agents/jev-browser/test/viewer.test.mjsindex 4c551b2c4..baa5ad1f3 100644--- a/store/agents/jev-browser/test/viewer.test.mjs+++ b/store/agents/jev-browser/test/viewer.test.mjs@@ -40,11 +40,13 @@ const browser = async (allowedHosts = ['127.0.0.1', 'localhost']) =>openChrome({ profileDir: mkdtempSync(join(tmpdir(), 'jev-browser-test-')), show: false, allowedHosts })test('the job file: what it fills in, and what it says is wrong', () => {- // The starter job is an address and a sentence, and nothing about any particular kind of site.- const { job, errors } = normalizeJob(JSON.parse(readFileSync(join(TEMPLATE, 'browse.json'), 'utf8')))- assert.deepEqual(errors, [])+ // The starter job is empty on purpose: the pane's two boxes are the questions, and nothing is+ // pre-filled with somebody else's job.+ const starter = JSON.parse(readFileSync(join(TEMPLATE, 'browse.json'), 'utf8'))+ const { job } = normalizeJob(starter)assert.deepEqual(job.fields, [], 'the starter names no columns: Jev works them out')- assert.ok(job.want.length > 10, 'it says what is wanted, in a sentence')+ assert.equal(starter.start, '', 'and no address')+ assert.equal(starter.want, '', 'and nothing it wants')assert.equal(job.sameSiteOnly, true)const named = normalizeJob({ start: 'https://x.test/all', fields: FIELDS })assert.deepEqual(named.errors, [])diff --git a/store/agents/jev-browser/viewer/index.html b/store/agents/jev-browser/viewer/index.htmlindex b170990bb..1b378c9cc 100644--- a/store/agents/jev-browser/viewer/index.html+++ b/store/agents/jev-browser/viewer/index.html@@ -47,28 +47,33 @@<form id="askForm" class="ask"><div class="ask-head"><b>What do you want off the web?</b><span>A site and a sentence is enough. Jev finds the right page, works out the columns in about a second, and goes.</span></div><label class="ask-row"><span>Start on</span>- <input id="askStart" type="text" spellcheck="false" autocomplete="off" placeholder="books.toscrape.com — a site or the exact page">- </label>- <label class="ask-row"><span>Search for <i>optional</i></span>- <input id="askSearch" type="text" spellcheck="false" autocomplete="off" placeholder="leave empty if the address is already the list you want">+ <input id="askStart" type="text" spellcheck="false" autocomplete="off" placeholder="books.toscrape.com"></label><label class="ask-row"><span>What you want</span><input id="askWant" type="text" spellcheck="false" autocomplete="off" placeholder="travel books, with the price and whether they are in stock"></label>- <label class="ask-row"><span>Each one is <i>optional</i></span>- <input id="askItem" type="text" spellcheck="false" autocomplete="off" placeholder="Jev works this out from the page">- </label>- <label class="ask-row tall"><span>Columns<i>optional, one per line</i></span>- <textarea id="askColumns" spellcheck="false" placeholder="Leave this empty and Jev picks the columns off the page. Or name them yourself, one per line: the title the price Is it in stock?"></textarea>- </label>- <label class="ask-row"><span>Only keep <i>optional</i></span>- <input id="askKeep" type="text" spellcheck="false" autocomplete="off" placeholder="only the ones under £30">- </label><div class="ask-go">- <label class="ask-n">at most <input id="askMax" type="number" min="1" max="500" value="25"> of them</label>- <button type="button" id="askDemo" title="Walk the small made-up job board this harness serves on your machine">Try the practice site</button>+ <button type="button" id="askMore" class="more" aria-expanded="false">More ▾</button>+ <button type="button" id="askDemo" title="Walk the small made-up site this harness serves on your machine">Try the practice site</button><button type="submit" class="primary" id="askSubmit">Go</button></div>+ <div id="askExtra" class="ask-extra hidden">+ <label class="ask-row"><span>Search for</span>+ <input id="askSearch" type="text" spellcheck="false" autocomplete="off" placeholder="words to type into the site's own search box">+ </label>+ <label class="ask-row"><span>Each one is</span>+ <input id="askItem" type="text" spellcheck="false" autocomplete="off" placeholder="Jev works this out from the page">+ </label>+ <label class="ask-row tall"><span>Columns<i>one per line</i></span>+ <textarea id="askColumns" spellcheck="false" placeholder="Jev picks these off the page. Name them here to decide yourself: the title the price Is it in stock?"></textarea>+ </label>+ <label class="ask-row"><span>Only keep</span>+ <input id="askKeep" type="text" spellcheck="false" autocomplete="off" placeholder="only the ones under £30">+ </label>+ <label class="ask-row"><span>How many</span>+ <span class="ask-n">at most <input id="askMax" type="number" min="1" max="500" value="25"> of them</span>+ </label>+ </div><div class="ask-msg" id="askMsg"></div></form><div class="screen-note" id="chromeNote"></div>diff --git a/store/agents/jev-browser/viewer/studio.css b/store/agents/jev-browser/viewer/studio.cssindex a339e6724..e02f0fdc8 100644--- a/store/agents/jev-browser/viewer/studio.css+++ b/store/agents/jev-browser/viewer/studio.css@@ -106,7 +106,10 @@ td.addr a:hover { color: var(--accent); text-decoration: underline; }.ask-n { font-size: 11.5px; color: var(--dim); display: flex; align-items: center; gap: 6px; }.ask-n input { width: 64px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line2); background: #0b0d14; color: var(--ink); font: 12px var(--mono); outline: none; }.ask-go button { padding: 8px 16px; }-.ask-go .primary { margin-left: auto; }++.ask-extra { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }+.ask-extra.hidden { display: none; }+.ask-go .more { margin-right: auto; font-size: 11px; padding: 6px 10px; color: var(--dim); }.ask-msg { margin-left: 128px; min-height: 15px; font-size: 11.5px; color: var(--dim); }.ask-msg.bad { color: var(--bad); }.screen.asking { flex: 1 1 100%; }diff --git a/store/agents/jev-browser/viewer/studio.js b/store/agents/jev-browser/viewer/studio.jsindex f68625de1..f0449c363 100644--- a/store/agents/jev-browser/viewer/studio.js+++ b/store/agents/jev-browser/viewer/studio.js@@ -182,6 +182,8 @@ function showAsk(on) {$('askKeep').value = S?.keep ?? ''$('askMax').value = S?.fields.length ? S.maxItems : 25$('askMsg').textContent = ''+ // The extra boxes stay folded away unless this job is actually using one of them.+ showMore(!!(S?.search || S?.keep || S?.fields.length))setTimeout(() => $('askStart').focus(), 30)}}@@ -200,9 +202,15 @@ async function sendJob(over = {}) {showAsk(false)toast('Off it goes. The browser is opening.')}+function showMore(on) {+ $('askExtra').classList.toggle('hidden', !on)+ $('askMore').setAttribute('aria-expanded', String(on))+ $('askMore').textContent = on ? 'Fewer ▴' : 'More ▾'+}+$('askMore').addEventListener('click', () => showMore($('askExtra').classList.contains('hidden')))$('askForm').addEventListener('submit', (e) => { e.preventDefault(); sendJob() })$('askDemo').addEventListener('click', () => sendJob({- start: 'demo', search: '', item: '', want: 'what each role pays and where it is', columns: '', keep: '',+ start: 'demo', search: '', item: '', want: 'what each one is called and what it pays', columns: '', keep: '',}))$('editBtn').addEventListener('click', () => showAsk(!askOpen))diff --git a/store/showcase/jev-browser/two-boxes.jpg b/store/showcase/jev-browser/two-boxes.jpgnew file mode 100644index 000000000..ed6bf1d83Binary files /dev/null and b/store/showcase/jev-browser/two-boxes.jpg differ