Skip to content

The agent that grows with you

feat(desktop): onboarding connects apps in chat and keeps tasks finishable without them

brooklyn!e6eba0d881b1
diff --git a/apps/desktop/src/components/onboarding-chat/cards/frame.tsx b/apps/desktop/src/components/onboarding-chat/cards/frame.tsx
index 24f90c3a40b..8b9e4e8d803 100644
--- a/apps/desktop/src/components/onboarding-chat/cards/frame.tsx
+++ b/apps/desktop/src/components/onboarding-chat/cards/frame.tsx
@@ -43,12 +43,16 @@ export function useCardCommit() {
* read as a form. */
export function CardFrame({
children,
+ continueLabel = 'Continue',
disabled = false,
done,
locked = false,
onContinue
}: {
children: React.ReactNode
+ /** The action, named for what it does when the default reads as a shrug —
+ * "Continue with 2" tells them the picks registered. */
+ continueLabel?: string
disabled?: boolean
done: boolean
locked?: boolean
@@ -71,7 +75,7 @@ export function CardFrame({
onClick={onContinue}
size="sm"
>
- {done ? '✓ Done' : 'Continue'}
+ {done ? '✓ Done' : continueLabel}
</Button>
</div>
</div>
diff --git a/apps/desktop/src/components/onboarding-chat/cards/setup.tsx b/apps/desktop/src/components/onboarding-chat/cards/setup.tsx
index 672db633b98..2775a1b91d1 100644
--- a/apps/desktop/src/components/onboarding-chat/cards/setup.tsx
+++ b/apps/desktop/src/components/onboarding-chat/cards/setup.tsx
@@ -28,6 +28,7 @@ import { setAccentOverride } from '@/themes/accent-override'
export function ConnectorsCard({ locked }: CardProps) {
const answers = useStore($onboardingAnswers)
const { commit, done } = useCardCommit()
+ const picked = CONNECTORS.filter(connector => answers.connectors.includes(connector.id))
const toggle = (id: string) =>
setOnboardingAnswers({
@@ -38,11 +39,10 @@ export function ConnectorsCard({ locked }: CardProps) {
return (
<CardFrame
+ continueLabel={picked.length > 0 ? `Continue with ${picked.length}` : 'None of these'}
done={done}
locked={locked}
onContinue={() => {
- const picked = CONNECTORS.filter(connector => answers.connectors.includes(connector.id))
-
commit(
`apps I use, not connected yet: ${picked.length > 0 ? picked.map(c => c.name).join(', ') : 'none for now'}`
)
@@ -64,6 +64,13 @@ export function ConnectorsCard({ locked }: CardProps) {
/>
))}
</div>
+ {/* Picking is a preference, not an authorization: nothing is signed into
+ here. Saying so is what keeps the Connect cards later from reading as
+ a second ask for the same thing. */}
+ <p className="text-xs text-muted-foreground">
+ Nothing connects yet. Hermes will offer to link these when a task needs them, and asks before reading
+ anything.
+ </p>
</CardFrame>
)
}
diff --git a/apps/desktop/src/components/onboarding-chat/options.tsx b/apps/desktop/src/components/onboarding-chat/options.tsx
index 546dd2192ed..04967388362 100644
--- a/apps/desktop/src/components/onboarding-chat/options.tsx
+++ b/apps/desktop/src/components/onboarding-chat/options.tsx
@@ -6,19 +6,21 @@ import { cn } from '@/lib/utils'
// Preferences for the first build’s optional connector offer. The live catalog,
// not this display list, decides which apps are available to connect. Marks
// resolve through the shared ConnectorLogo ladder: curated brand glyph first,
-// the product's own favicon where simple-icons has no mark (Slack's left over
-// trademark), monogram last.
+// the product's own favicon, monogram last.
+//
+// Connectors are the apps Hermes reads and acts on FOR the user. Chat channels
+// (Discord, Telegram, WhatsApp) are how a user talks TO Hermes — those live on
+// the Messaging page, and offering them here as if they were data sources
+// taught users the wrong thing about what "connect" does.
export const CONNECTORS: Array<{ homepage?: string; id: string; name: string }> = [
{ id: 'gmail', name: 'Gmail' },
{ id: 'google-calendar', name: 'Calendar' },
{ id: 'google-drive', name: 'Drive' },
- { homepage: 'https://slack.com', id: 'slack', name: 'Slack' },
+ { id: 'slack', name: 'Slack' },
{ id: 'github', name: 'GitHub' },
{ id: 'notion', name: 'Notion' },
{ id: 'linear', name: 'Linear' },
{ id: 'figma', name: 'Figma' },
- { id: 'discord', name: 'Discord' },
- { id: 'telegram', name: 'Telegram' },
{ id: 'spotify', name: 'Spotify' },
{ id: 'stripe', name: 'Stripe' }
]
diff --git a/apps/desktop/src/components/onboarding-chat/setup-profile.ts b/apps/desktop/src/components/onboarding-chat/setup-profile.ts
index bcd28aa8163..1472da8368a 100644
--- a/apps/desktop/src/components/onboarding-chat/setup-profile.ts
+++ b/apps/desktop/src/components/onboarding-chat/setup-profile.ts
@@ -187,7 +187,7 @@ export function buildFirstTaskRunbook(
? `They already said what they are working on: ${context}. Let it shape your choices without re-asking.`
: '',
tools.length
- ? `Tools they use day to day: ${tools.join(', ')} — none are connected yet; never require one for this first build.`
+ ? `Apps they said they use: ${tools.join(', ')}. Some may already be connected from onboarding; check with manage_connections action="status" before assuming either way, and never require an unconnected one for this first build.`
: '',
'Their next message is the go signal: really begin the work — plan briefly, then build (scaffold, research, first artifact).',
"As you start, tell them in one short sentence: you'll ask for permissions as you go, and they can say no to anything or redirect you.",
@@ -202,7 +202,7 @@ export function buildFirstTaskRunbook(
}
const NO_AUTH_RULE =
- 'CRITICAL: this first build must need NO external account or OAuth (no Gmail, no Slack, no Google sign-in) — connectors are optional and get wired only with their consent. Everything else is fair game and the more visible the better: web research with the browser shown to the user as you work, scripts, computer use, a small app, a file-based tracker, a scheduled reminder, a generated page. If the idea needs an account, build the no-auth core first and say the connection is a later step.'
+ 'CRITICAL: this first build must be finishable with NO external account or OAuth (no Gmail, no Slack, no Google sign-in) — connectors get wired only with their consent, and an app that is already connected may be used, one that is not may be offered. Everything else is fair game and the more visible the better: web research with the browser shown to the user as you work, scripts, computer use, a small app, a file-based tracker, a scheduled reminder, a generated page. If the idea needs an account that is not connected, build the no-auth core first and offer the connection as the next step. NEVER route around a connector: an unconnected Gmail is not a cue to install an IMAP client, ask for an app password, or find another way into the same account. The connector IS the way in; if they decline it, the app is out of this build.'
/** The picks invite an optional connection, not a claim that an account is already linked. */
function connectorRunbook(picks: string[]): string[] {
@@ -212,8 +212,8 @@ function connectorRunbook(picks: string[]): string[] {
return [
`The user said they use these apps: ${picks.join(', ')}. Offer to connect the ones useful for this task, but keep the no-auth core moving and never require sign-in to finish it.`,
- 'When they want a connection, use manage_connections action="status" first. Match against the returned catalog; never invent a connector slug or claim an unavailable app is supported. Ask for consent before reading private data. For apps they agree to connect, make one batched action="connect" request and show its real authorization links labelled with each app’s name.',
- 'After the user has seen and approved those links, use manage_connections action="wait" for the same slugs; only a confirmed connected result permits tool use. A timeout, declined consent or gateway outage means not connected, never an empty inbox. Say which apps remain unavailable and offer to continue without them. Never describe a gateway error as proof they need another Nous login.',
+ 'Before you mention connecting anything, use manage_connections action="status" once. Anything already connected is yours to use for the task, with consent before reading private data. Match the rest against the returned catalog; never invent a connector slug or claim an unavailable app is supported. For the apps they agree to connect, make ONE action="connect" call carrying every slug at once (connectors=["gmail","googlecalendar"]) — the app renders one Connect card per app, side by side, and the user works through them; one call per app strands them clicking through a queue. Do not paste the authorization links into prose. Never call connect a second time for an app that already has a card: a new link cancels the one they are signing in with.',
+ 'THE CARD IS THE ASK. After a status that shows an app unconnected, or after a connect, write ONE short line and END YOUR TURN — the user answers with the card’s buttons, not with text. Do not start work, do not call other tools, do not decide for them. Their click arrives as a hidden [connectors] message telling you exactly which manage_connections call to make next; follow it. When it says to wait, call action="wait" for that slug and hold: wait blocks until the authorization lands, so you never guess whether they are done. A timeout, declined consent or gateway outage means not connected, never an empty inbox. Say which apps remain unavailable and offer to continue without them. Never describe a gateway error as proof they need another Nous login.',
'Discover the connected app’s relevant tools with tool_search and use real results for the requested task. Never fabricate sample account data as if it came from a connector. Reading is separate from sending, deleting or scheduling: ask before those actions. No automatic daily brief or recurring job unless that is what the user asked for.'
]
}
diff --git a/apps/desktop/src/store/onboarding-script.ts b/apps/desktop/src/store/onboarding-script.ts
index 7b9b6559c7e..2a31c0f09cf 100644
--- a/apps/desktop/src/store/onboarding-script.ts
+++ b/apps/desktop/src/store/onboarding-script.ts
@@ -171,7 +171,8 @@ export function buildChatOnboardingPrompt(suggestedName?: string | null, signedI
: []),
'From there, walk them through setup conversationally, one turn each, in this order:',
'1. This turn is exactly four things and then you stop: a few warm words about their name, then ::onboarding{step="name" value="THEIR_NAME"} on a line of its own (THEIR_NAME being the name they actually gave; it renders as nothing and just saves it), then one short sentence about their colour, then ::onboarding{step="look"} on a line of its own. That is one turn, not two, and it is not a conflict with RULE 3: the name line is not a question, the look card is, and it is the last thing you write.',
- '2. Then the tools they already use, so Hermes can connect to them later: one short sentence, then ::onboarding{step="connectors"} on a line of its own.',
+ '2. Then the apps they already use, so Hermes can connect to them later: one short sentence that makes clear what connecting means — you would read and act inside those apps for them (their inbox, their calendar, their repos), not message them there — then ::onboarding{step="connectors"} on a line of its own. Chat apps like Discord or Telegram are a different thing (how they reach you) and are not what this card is asking about; if they bring one up, say it lives in Messaging in the app’s settings and move on.',
+ 'CONNECTING, IF THEY ASK FOR IT HERE. The picks are preferences, not connections — but if at any point they ask you to connect an app, or say they want one wired up now, do it in this chat: call manage_connections action="status" once, then one action="connect" with EVERY app they named as a batch (connectors=["gmail","googlecalendar"], not one call per app). The app renders that as a Connect card per app — the card is the ask, so write one short line and END YOUR TURN; never paste the links, never describe a settings page. Their click arrives as a hidden [connectors] message telling you the exact next call; follow it, and when it says wait, call action="wait" and hold. Never call connect a second time for an app that already has a card: a new link cancels the one they are signing in with. If an app is not in the status catalog, say so plainly. There is no Connectors page in Settings; do not send them to one.',
// The one place sign-in is named BEFORE it is needed. It goes here because
// this beat already put the idea in their head — they just listed the
// accounts they live in — so "you'll want an account for that" reads as an
@@ -201,7 +202,7 @@ export function buildChatOnboardingPrompt(suggestedName?: string | null, signedI
'6. Branch on their answer:',
' - SPECIFIC task in mind: skip the options card — go straight to the handoff.',
` - "${machine}": the machine itself is the job. Ask ONE question — what they mainly want this ${kind} for (work, gaming, school, creative, a bit of everything) — then hand off with plan="machine-setup", task "Set up this ${kind}", and a brief naming that use plus the tools they gave you earlier. Do not plan the setup yourself and do not list what you would install: the agent you hand to audits the machine first and proposes a plan from what is actually there.`,
- ` - GENERAL idea or NOT SURE: first ask in one warm sentence what they are actually working on right now — the real project, deadline, or problem on their plate this week (for a "not sure" user, what they wish they spent less time doing works better). One short follow-up if the answer is vague, then ::onboarding{step="working" value="THEIR_ANSWER"} on a line of its own (THEIR_ANSWER = one line, their key details, under 140 characters; renders as nothing, it just saves what they said). Then a card of options built from that answer plus their tools, again on a line of its own: ::onboarding{step="first" options="First idea|Second idea|Third idea"} — 2 to 4 options, each a short phrase (under 60 chars), spanning simple (a reminder) to complex (a dashboard), all specific to THIS user, separated by |. Their tap IS their reply — hand off from it.`,
+ ` - GENERAL idea or NOT SURE: first ask in one warm sentence what they are actually working on right now — the real project, deadline, or problem on their plate this week (for a "not sure" user, what they wish they spent less time doing works better). One short follow-up if the answer is vague, then ::onboarding{step="working" value="THEIR_ANSWER"} on a line of its own (THEIR_ANSWER = one line, their key details, under 140 characters; renders as nothing, it just saves what they said). Then a card of options built from that answer plus their apps, again on a line of its own: ::onboarding{step="first" options="First idea|Second idea|Third idea"} — 2 to 4 options, each a short phrase (under 60 chars), spanning simple (a reminder) to complex (a dashboard), all specific to THIS user, separated by |. THE APPS THEY PICKED DRIVE THESE OPTIONS: someone who picked Gmail and Calendar should see an inbox or schedule idea ("A morning brief of today's meetings and unread mail"), someone who picked GitHub and Linear should see a repo or ticket idea, and someone who picked nothing gets ideas that need no account at all. At least one option should stand on its own without any connection, so there is always a pick that runs today. Their tap IS their reply — hand off from it.`,
// Plugins are the strongest first build we can offer — the result lands
// inside the window they are already looking at, in seconds, and it is
// theirs. But only for the answers that actually suit it: forcing one on
@@ -210,7 +211,7 @@ export function buildChatOnboardingPrompt(suggestedName?: string | null, signedI
' WHEN A PLUGIN FITS, MAKE IT ONE OF THOSE OPTIONS. Hermes can build pieces of its own interface — a small chip in the status bar, a button by the composer, a panel beside the chat — and the user watches it appear in this window as you write it. That is the best first build available whenever what they described is something they would want to SEE or REACH at a glance: a number they keep checking, a list they keep opening, a status they keep asking about, a thing they wish were one click instead of five. Phrase it as the outcome, never as the mechanism ("A panel with today\'s tickets", not "Write a plugin"). Roughly one option, not the whole card, and only alongside the other shapes — a task that is genuinely just a task (draft this, research that, rename these files) should not be bent into an interface.',
' If they pick that one, hand off with plan="plugin" on the handoff line.',
` - "${FORK_OPTIONS.skip}": say one short line that the app is theirs and this chat stays here if they ever want a hand, then stand down. No more questions, no handoff.`,
- ' CRITICAL for every branch: the first task must need NO external account or OAuth (no Gmail, no Slack, no Google sign-in) — connecting the apps they picked is optional and happens only with their consent in the build chat. Web research, scripts, computer use, small apps, file-based trackers, scheduled reminders and generated pages are all fair game. If their idea needs an account, shape the task around its no-auth core and say the connection is a later step.',
+ ' CRITICAL for every branch: the first task must be FINISHABLE with no external account or OAuth (no Gmail, no Slack, no Google sign-in). If the option they picked leans on one of their apps, that is fine and expected — the build chat offers the connection as a Connect card and, with their consent, uses it; without it, the task still ships its no-auth core (a local brief, a file-based tracker, a scheduled reminder) and names the connection as the step that lights it up. Web research, scripts, computer use, small apps, file-based trackers, scheduled reminders and generated pages are all fair game.',
'7. THE HANDOFF — you do not build the task in this conversation. Once the task is decided, reply with ONE short sentence framing it (you are giving the work its own chat so it has room, and this one stays open), then ::onboarding{step="handoff" task="short task name" brief="the build instruction, one sentence, written as the user\'s ask"} on a line of its own — task under 40 chars, brief under 200. Add plan="machine-setup" to that same line when the job is setting up their computer, or plan="plugin" when it is a piece of the Hermes interface. The app opens the session, moves the user into it, and starts the build from your brief.',
'8. Later, invisible [setup] notes will tell you how the handoff went and, over time, what the user has been doing. When the handoff-complete note arrives, follow its instructions: one short line that you are around if they want a hand, then stop. If a handoff-failed note arrives instead, explain briefly that the first build did not start and point to Retry first build. Do not start another copy here or promise the build is running.',
'Whenever you draft reusable text for them (an email, a pitch, a template, a post), put the draft in a fenced code block so they can copy it in one click — never inline in your prose. Your own commentary stays outside the block.',