Autonomous AI sales agent powered by Claude Code or Codex. Finds prospects, writes cold emails, sends campaigns, handles replies, books meetings. No API keys needed — runs on your Claude or Codex subscriptions.
Merge main (#55) into the redesign: IMAP and Microsoft 365 settings in the new layout
Ethan5d4179bc3551
diff --cc harvey/web/app.cssindex d5b0621,fb28050..7ec524a--- a/harvey/web/app.css+++ b/harvey/web/app.css@@@ -971,19 -601,5 +971,22 @@@ textarea.form-input { height: auto; pad}@media (prefers-reduced-motion: reduce) {- *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }-}+ *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }+}++/* Replies and scraped text are written by outsiders: a 3,000-character URL+ must wrap inside its box, never push the page sideways. */+.desk-pane .body, .thread-msg, .te-body, .td-body, .te-head span, .cell-main, .cell-sub { overflow-wrap: anywhere; }++.convo-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--line); }+.convo-actions .muted { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-caption); margin-right: auto; }+.convo-actions .btn-ghost { margin-left: auto; }+.facts { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 10px 4px 0; margin-bottom: var(--sp-5); font-size: var(--fs-caption); color: var(--text-3); }+.facts b { color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; }+.cell-sub .verified { color: var(--good); font-weight: 600; }+/* Long subjects end in an ellipsis; the card scrolls sideways if it must. */+table.clip td { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }+.live-next .btn { margin-left: auto; }++.more-fields { margin-bottom: var(--sp-3); }++.more-fields summary { cursor: pointer; font-size: var(--fs-ui); color: var(--text-2); margin-bottom: var(--sp-3); }++.check-line { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-ui); color: var(--text-2); cursor: pointer; }diff --cc harvey/web/app.jsindex 08513f9,9c43613..df55047--- a/harvey/web/app.js+++ b/harvey/web/app.js@@@ -1836,20 -1606,9 +1867,20 @@@ function fbProspect(i)function fbCampaign(i) {const c = _campaigns[i];- if (c) submitFeedback('campaign', c.id, 'Leave feedback on this campaign:');+ if (c) submitFeedback('campaign', c.id, 'What should Harvey do differently in the emails it writes next? (e.g. "shorter; don\'t mention reviews")');}+// Search and status filter live outside the table, so the 15-second refresh+// re-renders rows without losing what you typed.+let _contactQuery = '', _contactFilter = 'all';+const CONTACT_FILTERS = [+ ['all', 'All', null],+ ['todo', 'To write', ['new', 'queued']],+ ['contacted', 'Contacted', ['contacted']],+ ['replied', 'Replied', ['replied', 'interested', 'meeting']],+ ['closed', 'Closed out', null],+];+async function loadProspects() {const el = document.getElementById('prospects-table');const data = await api('/api/prospects');diff --cc harvey/web/index.htmlindex 24ab37d,5684ea1..d526f0e--- a/harvey/web/index.html+++ b/harvey/web/index.html@@@ -275,59 -221,79 +275,88 @@@<!-- Settings --><div id="settings" class="section">- <div class="section-head"><h2>Settings</h2><p>Credentials are stored locally in <span style="font-family:var(--mono);font-size:12px">.env</span> — never sent anywhere except the services themselves.</p></div>+ <div class="section-head"><div><h2>Settings</h2><p>Credentials are stored locally in <code>.env</code> and never sent anywhere except the services themselves.</p></div></div>+- <div class="subhead">Email provider <span class="hint">Active: <b id="active-provider">…</b> · set <code>channels.email.provider</code> in <code>harvey.yaml</code></span></div>++ <div class="subhead">Email provider <span class="hint">Active: <b id="active-provider">…</b> · set <code>channels.email.provider</code> in <code>harvey.yaml</code> to gmail, microsoft, smtp or instantly</span></div><div class="card">- <h2>Email Provider</h2>- <p class="lede">How Harvey sends and reads replies. Active provider: <b id="active-provider">…</b> — change it by setting <span style="font-family:var(--mono);font-size:12px">channels.email.provider</span> in <span style="font-family:var(--mono);font-size:12px">harvey.yaml</span> to <span style="font-family:var(--mono);font-size:12px">gmail</span>, <span style="font-family:var(--mono);font-size:12px">microsoft</span>, <span style="font-family:var(--mono);font-size:12px">smtp</span>, or <span style="font-family:var(--mono);font-size:12px">instantly</span>.</p>-- <div style="border:1px solid var(--border);border-radius:10px;padding:16px;margin-bottom:12px">- <div style="font-weight:650;margin-bottom:4px">Gmail / Google Workspace <span class="optional-tag">recommended</span> <span id="gmail-status" class="email-tag"></span></div>- <p class="lede" style="margin-top:4px">Use a mailbox on a dedicated secondary domain. Create an OAuth client (type "Desktop app") in Google Cloud Console → Gmail API, paste the id/secret, save, then run <span style="font-family:var(--mono);font-size:12px">harvey gmail auth</span> in your terminal.</p>- <div class="form-group"><label class="form-label" for="gmail-id">Client ID</label>- <input type="text" class="form-input" id="gmail-id" placeholder="xxxx.apps.googleusercontent.com" autocomplete="off"></div>- <div class="form-group"><label class="form-label" for="gmail-secret">Client Secret</label>- <div class="form-row"><div class="form-group" style="margin-bottom:0">- <input type="password" class="form-input" id="gmail-secret" placeholder="Enter client secret" autocomplete="off"></div>- <button class="btn btn-secondary btn-sm" onclick="toggleVisibility('gmail-secret')">Show</button></div></div>- <button class="btn btn-primary btn-sm" onclick="saveGmail()">Save Gmail</button>+ <div class="settings-row">+ <div>+ <h3>Gmail / Google Workspace <span class="tag accent">Recommended</span> <span id="gmail-status" class="email-tag"></span></h3>+ <p class="desc">Use a mailbox on a dedicated secondary domain. Create an OAuth client (type "Desktop app") in Google Cloud Console → Gmail API, paste the id and secret, save, then run <code>harvey gmail auth</code>.</p>+ </div>+ <div class="fields">+ <div class="form-group"><label class="form-label" for="gmail-id">Client ID</label>+ <input type="text" class="form-input" id="gmail-id" placeholder="xxxx.apps.googleusercontent.com" autocomplete="off"></div>+ <div class="form-group"><label class="form-label" for="gmail-secret">Client secret</label>+ <div class="with-btn"><input type="password" class="form-input" id="gmail-secret" placeholder="Enter client secret" autocomplete="off">+ <button class="btn btn-secondary" onclick="toggleVisibility('gmail-secret')">Show</button></div></div>+ <button class="btn btn-primary btn-sm" onclick="saveGmail()">Save Gmail</button>+ </div></div>- <div style="border:1px solid var(--border);border-radius:10px;padding:16px;margin-bottom:12px">- <div style="font-weight:650;margin-bottom:4px">SMTP + IMAP mailbox</div>- <p class="lede" style="margin-top:4px">Any real mailbox (AgentMail, Fastmail, a Workspace app password). IMAP defaults to the SMTP host/login if left blank.</p>- <div class="form-row">- <div class="form-group"><label class="form-label" for="smtp-host">SMTP host</label>- <input type="text" class="form-input" id="smtp-host" placeholder="smtp.example.com" autocomplete="off"></div>- <div class="form-group" style="max-width:120px"><label class="form-label" for="smtp-port">Port</label>- <input type="text" class="form-input" id="smtp-port" placeholder="587" autocomplete="off"></div>+ <div class="settings-row">+ <div>+ <h3>SMTP + IMAP mailbox</h3>+ <p class="desc">Any real mailbox (AgentMail, Fastmail, a Workspace app password). IMAP defaults to the SMTP host and login if left blank.</p></div>- <div class="form-group"><label class="form-label" for="smtp-user">Username</label>- <input type="text" class="form-input" id="smtp-user" placeholder="[email protected]" autocomplete="off"></div>- <div class="form-group"><label class="form-label" for="smtp-pass">Password</label>- <div class="form-row"><div class="form-group" style="margin-bottom:0">- <input type="password" class="form-input" id="smtp-pass" placeholder="Enter password / app password" autocomplete="off"></div>- <button class="btn btn-secondary btn-sm" onclick="toggleVisibility('smtp-pass')">Show</button></div></div>- <details style="margin-bottom:12px">- <summary style="cursor:pointer;font-size:13px;color:var(--text-2)">Reading replies from a different IMAP server or login</summary>- <div class="form-row" style="margin-top:10px">- <div class="form-group"><label class="form-label" for="imap-host">IMAP host</label>- <input type="text" class="form-input" id="imap-host" placeholder="Same as SMTP host" autocomplete="off"></div>- <div class="form-group" style="max-width:120px"><label class="form-label" for="imap-port">Port</label>- <input type="text" class="form-input" id="imap-port" placeholder="993" autocomplete="off"></div>+ <div class="fields">+ <div class="form-row">+ <div class="form-group"><label class="form-label" for="smtp-host">SMTP host</label>+ <input type="text" class="form-input" id="smtp-host" placeholder="smtp.example.com" autocomplete="off"></div>+ <div class="form-group" style="max-width:120px"><label class="form-label" for="smtp-port">Port</label>+ <input type="text" class="form-input" id="smtp-port" placeholder="587" autocomplete="off"></div></div>- <div class="form-group"><label class="form-label" for="imap-user">IMAP username</label>- <input type="text" class="form-input" id="imap-user" placeholder="Same as SMTP username" autocomplete="off"></div>- <div class="form-group"><label class="form-label" for="imap-pass">IMAP password</label>- <div class="form-row"><div class="form-group" style="margin-bottom:0">- <input type="password" class="form-input" id="imap-pass" placeholder="Same as SMTP password" autocomplete="off" oninput="if (this.value) document.getElementById('imap-same-pass').checked = false"></div>- <button class="btn btn-secondary btn-sm" onclick="toggleVisibility('imap-pass')">Show</button></div></div>- <label style="display:inline-flex;align-items:center;gap:6px;font-size:13px;cursor:pointer">- <input type="checkbox" id="imap-same-pass"> Use the SMTP password for IMAP</label>- </details>- <button class="btn btn-primary btn-sm" onclick="saveSmtp()">Save SMTP</button>+ <div class="form-group"><label class="form-label" for="smtp-user">Username</label>+ <input type="text" class="form-input" id="smtp-user" placeholder="[email protected]" autocomplete="off"></div>+ <div class="form-group"><label class="form-label" for="smtp-pass">Password</label>+ <div class="with-btn"><input type="password" class="form-input" id="smtp-pass" placeholder="Enter password / app password" autocomplete="off">+ <button class="btn btn-secondary" onclick="toggleVisibility('smtp-pass')">Show</button></div></div>++ <details class="more-fields">++ <summary>Reading replies from a different IMAP server or login</summary>++ <div class="form-row">++ <div class="form-group"><label class="form-label" for="imap-host">IMAP host</label>++ <input type="text" class="form-input" id="imap-host" placeholder="Same as SMTP host" autocomplete="off"></div>++ <div class="form-group" style="max-width:120px"><label class="form-label" for="imap-port">Port</label>++ <input type="text" class="form-input" id="imap-port" placeholder="993" autocomplete="off"></div>++ </div>++ <div class="form-group"><label class="form-label" for="imap-user">IMAP username</label>++ <input type="text" class="form-input" id="imap-user" placeholder="Same as SMTP username" autocomplete="off"></div>++ <div class="form-group"><label class="form-label" for="imap-pass">IMAP password</label>++ <div class="with-btn"><input type="password" class="form-input" id="imap-pass" placeholder="Same as SMTP password" autocomplete="off" oninput="if (this.value) document.getElementById('imap-same-pass').checked = false">++ <button class="btn btn-secondary" onclick="toggleVisibility('imap-pass')">Show</button></div></div>++ <label class="check-line"><input type="checkbox" id="imap-same-pass"> Use the SMTP password for IMAP</label>++ </details>+ <button class="btn btn-primary btn-sm" onclick="saveSmtp()">Save SMTP</button>+ </div></div>- <div style="border:1px solid var(--border);border-radius:10px;padding:16px;margin-bottom:12px">- <div style="font-weight:650;margin-bottom:4px">Microsoft 365 / Outlook <span id="m365-status" class="email-tag"></span></div>- <p class="lede" style="margin-top:4px">Microsoft turned off password sign-in for IMAP, so Outlook mailboxes connect with OAuth. In <a href="https://entra.microsoft.com" target="_blank" rel="noopener noreferrer">Entra</a> → App registrations, register an app for your organization only, add the redirect URI <span style="font-family:var(--mono);font-size:12px">http://localhost:8766</span> as "Public client/native", paste both IDs here, save, then run <span style="font-family:var(--mono);font-size:12px">harvey microsoft auth</span> in your terminal. No client secret is needed.</p>- <div class="form-row">++ <div class="settings-row">++ <div>++ <h3>Microsoft 365 / Outlook <span id="m365-status" class="email-tag"></span></h3>++ <p class="desc">Microsoft turned off password sign-in for IMAP, so Outlook mailboxes connect with OAuth. In <a href="https://entra.microsoft.com" target="_blank" rel="noopener noreferrer">Entra</a> → App registrations, register an app for your organization only and add the redirect URI <code>http://localhost:8766</code> as "Public client/native". Paste both IDs here, save, then run <code>harvey microsoft auth</code>. No client secret is needed.</p>++ </div>++ <div class="fields">+ <div class="form-group"><label class="form-label" for="m365-client">Application (client) ID</label>+ <input type="text" class="form-input" id="m365-client" placeholder="00000000-0000-0000-0000-000000000000" autocomplete="off"></div>+ <div class="form-group"><label class="form-label" for="m365-tenant">Directory (tenant) ID</label>+ <input type="text" class="form-input" id="m365-tenant" placeholder="00000000-0000-0000-0000-000000000000" autocomplete="off"></div>++ <button class="btn btn-primary btn-sm" onclick="saveMicrosoft()">Save Microsoft 365</button>+ </div>- <button class="btn btn-primary btn-sm" onclick="saveMicrosoft()">Save Microsoft 365</button>+ </div>+- <div style="border:1px solid var(--border);border-radius:10px;padding:16px">- <div style="font-weight:650;margin-bottom:4px">Instantly <span class="optional-tag">legacy</span></div>- <p class="lede" style="margin-top:4px">Get your API key from <a href="https://app.instantly.ai/app/settings/integrations" target="_blank" rel="noopener">Instantly Settings → Integrations</a> (Growth plan+ for API).</p>- <div class="form-group"><div class="form-row"><div class="form-group" style="margin-bottom:0">- <input type="password" class="form-input" id="instantly-key" placeholder="Enter your Instantly API key" autocomplete="off"></div>- <button class="btn btn-secondary btn-sm" onclick="toggleVisibility('instantly-key')">Show</button>- <button class="btn btn-secondary btn-sm" onclick="testInstantly()">Test</button></div>- <div id="instantly-test-result"></div></div>- <button class="btn btn-primary btn-sm" onclick="saveInstantly()">Save Instantly</button>+ <div class="settings-row">+ <div>+ <h3>Instantly <span class="tag">Legacy</span></h3>+ <p class="desc">Get your API key from <a href="https://app.instantly.ai/app/settings/integrations" target="_blank" rel="noopener">Instantly Settings → Integrations</a> (Growth plan or higher for API).</p>+ </div>+ <div class="fields">+ <div class="form-group"><label class="form-label" for="instantly-key">API key</label>+ <div class="with-btn"><input type="password" class="form-input" id="instantly-key" placeholder="Enter your Instantly API key" autocomplete="off">+ <button class="btn btn-secondary" onclick="toggleVisibility('instantly-key')">Show</button>+ <button class="btn btn-secondary" onclick="testInstantly()">Test</button></div>+ <div id="instantly-test-result"></div></div>+ <button class="btn btn-primary btn-sm" onclick="saveInstantly()">Save Instantly</button>+ </div></div></div>