Files
ten31-database/start9/0.4/startos/versions/v0.1.0.71.ts
T
Keysat 606b336a00 outreach: voice by-purpose (larger sample) + Tier-B Gmail draft creation (v0.1.0:71)
(1) Voice: _voice_examples now picks the sender's prior sent emails OF THE SAME PURPOSE
(PURPOSE_PATTERNS keyword cues per outreach type), larger sample (8) weighted by purpose
then recency — not just recent. meta carries on_topic for transparency.

(2) Tier-B sending (gmail.compose now authorized in Workspace DWD). New
email_integration/compose.py create_outreach_draft: mints a compose-scoped DWD token for
the sender (credentials._mint/access_token_for parameterized by scope; GMAIL_COMPOSE_SCOPE),
builds an RFC822 message, and POSTs gmail.drafts.create into the SENDER's mailbox — as an
in-thread reply (threadId + In-Reply-To/References, recipient = matched LP address) when
there's an active thread, else a fresh email. NEVER sends — the human sends from Gmail
(guardrails #4, #6). Route POST /api/outreach/gmail-draft; UI "Create Gmail draft" button +
"Open Gmail Drafts" link. Tests: test_compose.py (parse/reply-target/RFC822+threading).
Message construction unit-verified; the live drafts.create runs on the box.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 22:30:05 -05:00

21 lines
1.1 KiB
TypeScript

import { VersionInfo } from '@start9labs/start-sdk'
// Two outreach upgrades. (1) Voice now learns from the sender's prior emails OF THE SAME
// PURPOSE (larger, purpose-weighted sample, not just recent). (2) Tier-B sending: with the
// gmail.compose scope authorized, an approved draft can be created straight into the
// sender's Gmail (and therefore Superhuman) Drafts — as an in-thread reply when there's an
// active thread, or a fresh email otherwise. Our code only ever CREATES a draft; the human
// sends from Gmail (guardrails #4, #6). No schema change.
export const v_0_1_0_71 = VersionInfo.of({
version: '0.1.0:71',
releaseNotes: {
en_US: [
'Outreach: drafts now learn your voice from your prior emails of the same purpose (a',
'bigger, more relevant sample), and a new "Create Gmail draft" button drops the approved',
'draft into your Gmail Drafts — as an in-thread reply for follow-ups — for you to review',
'and send. Nothing is sent automatically.',
].join(' '),
},
migrations: { up: async () => {}, down: async () => {} },
})