Skip to content

Bot kinds: personal vs company bots in the create flow, profile, and list - #837

Merged
poseljacob merged 2 commits into
mainfrom
feat/bot-kinds
Sep 15, 2026
Merged

poseljacob merged 2 commits into
mainfrom
feat/bot-kinds

Conversation

@poseljacob

Copy link
Copy Markdown
Contributor

What

Desktop half of bot kinds (spec: the local-bots BOT-KINDS doc). Pairs with the hq-cli change that adds hq bot create --kind personal|company --company <slug> and kind/companies on hq bot list --json.

  • Create-bot flow (Home step, Local only): one question — "Personal — acts as you" or "For a company" with a multi-select of the owner's cloud companies (slugs). Company kind requires at least one company; a company template defaults to a company bot for that company. The preview card shows "acts as you" / "for Indigo and Acme". Setup (startSetupBot) always creates a personal bot.
  • Platform: LocalBotCreateInput.kind / .companies, LocalBotRow.kind / .companies; both Tauri adapters pass them through; Rust create_args maps to --kind and one --company <slug> each (slug-validated, closed enum for kind).
  • Profile (LocalBotDetailPanel) and Settings → Bots list: "Personal · acts as you" or "Company · indigo, ridge". Rows without kind (older CLI) show nothing new.
  • Promote to cloud: only for company bots; personal bots see "Personal bots stay on this Mac". Rows without kind keep today's behaviour.

Checks

  • packages/ui: npx vitest run src/chat src/shell src/settings — 1986 passed; npx svelte-check --threshold error — 0 errors
  • packages/platform: sync-adapter-bots.test.ts — 10 passed
  • apps/sync: pnpm typecheck — 0 errors
  • apps/sync/src-tauri: cargo test --bin hq-sync-menubar create_args — 4 passed

Tests added

  • Model: company scope needs ≥1 owner company; toCreateInput passes kind and de-duplicated slugs; scopeLine.
  • Flow: the scope question end to end (default personal, company blocked until a company is picked, multi-select, ⌘↵ gated); no-company case.
  • Adapters: both send kind and companies with identical shapes.
  • Profile: kind line shown; promote hidden for personal, shown for company, unchanged when kind is absent.
  • Settings list: per-row kind label, none for older rows.
  • Rust: create_args_pass_kind_and_companies.

🤖 Generated with Claude Code

poseljacob and others added 2 commits September 15, 2026 13:54
…list

The New bot flow asks one question on the Home step: "Personal — acts as
you" or "For a company" with a multi-select of the owner's cloud companies
(slugs). Company kind needs at least one company; a company template
defaults to a company bot for that company. Setup creates a personal bot.

`LocalBotCreateInput` gains `kind` and `companies`; both Tauri adapters
pass them through and Rust `create_args` maps them to `--kind` and one
`--company <slug>` each (validated as slugs). `LocalBotRow` gains
`kind`/`companies`.

The bot profile and Settings → Bots show "Personal · acts as you" or
"Company · <slugs>"; rows from an older CLI without a kind show nothing
new. Promote to cloud is offered only for company bots; personal bots see
"Personal bots stay on this Mac".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Only company bots pass `--kind company` and `--company <slug>`; a personal
bot sends nothing, so a desktop build against an hq that predates `--kind`
keeps creating personal/setup bots. Rust refuses companies without the
company kind instead of dropping them.

The create flow remembers when the user answered "who is it for?" so
going back and picking a company template no longer flips Personal to
company. A company bot's promote dialog lists only the companies it
belongs to (when the row carries them).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@poseljacob
poseljacob merged commit 2294b2c into main Sep 15, 2026
15 checks passed
@poseljacob
poseljacob deleted the feat/bot-kinds branch September 15, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant