/** Declarative help for the `assistant contacts` command. */ import type { CliCommandHelp } from "../lib/cli-command-help.js"; export const contactsHelp: CliCommandHelp = { name: "contacts", description: "Manage and query the contact graph", options: [ { flags: "--json", description: "Machine-readable compact JSON output" }, ], helpText: ` Contacts represent people and entities the assistant interacts with. Each contact is identified by a UUID, has a role (contact or guardian), and can be linked to external identifiers — phone numbers, Telegram IDs, email addresses — via channel memberships. The contact graph is the source of truth for identity resolution across all channels. Examples: $ assistant contacts list $ assistant contacts get abc-123 $ assistant contacts invites list`, subcommands: [ { name: "list", description: "List contacts", options: [ { flags: "--role ", description: "Filter by role (contact, guardian, or omit for all)", }, { flags: "--limit ", description: "Maximum number of contacts to return", }, { flags: "--query ", description: "Search query to filter contacts", }, { flags: "--channel-address
", description: "Search by channel address (email, phone, handle)", }, { flags: "--channel-type ", description: "Filter by channel type (email, telegram, phone, whatsapp, slack)", }, ], helpText: ` Lists contacts with optional filtering. The --role flag accepts: contact or guardian (omit to show all). The --limit flag sets the maximum number of results (defaults to 50). When --query, --channel-address, or --channel-type is provided, a search is performed. --query does full-text search across contact names and linked external identifiers. --channel-address matches phone numbers, emails, or handles. --channel-type filters by channel kind. These filters can be combined. Without any search params, returns all contacts matching the role filter. Examples: $ assistant contacts list $ assistant contacts list --role guardian $ assistant contacts list --query "john" --limit 10 $ assistant contacts list --channel-address "+15551234567" $ assistant contacts list --channel-type telegram $ assistant contacts list --query "alice" --channel-type email $ assistant contacts list --role guardian --json`, }, { name: "get", args: "", description: "Get a contact by ID", helpText: ` Arguments: id UUID of the contact to retrieve. Run 'assistant contacts list' to find IDs. Returns the full contact record including role, display name, and all channel memberships (phone numbers, Telegram IDs, email addresses, etc.). For assistant-type contacts, additional assistant metadata is included. Examples: $ assistant contacts get 7a3b1c2d-4e5f-6789-abcd-ef0123456789 $ assistant contacts get abc-123 --json`, }, { name: "prompt", description: "Prompt user to register a contact channel via the app UI", options: [ { flags: "--channel ", description: "Suggested channel type hint (e.g. phone, email, telegram)", }, { flags: "--placeholder ", description: "Placeholder text for the address input field", }, { flags: "--default-value
", description: "Suggested address to pre-fill the input with (user can edit before submitting)", }, { flags: "--role ", description: "Intended role: guardian, trusted-contact, or unknown (default: unknown)", }, { flags: "--label