export { randomId as randomPixabotId, seededId as seededPixabotId } from '@pixabots/core'; /** * @designteam/core — Shared Types * * Personality scale: -5 to +5 (0 = neutral). * Negative values lean toward the LEFT label (Bold, Playful, Experimental, Verbose, Warm). * Positive values lean toward the RIGHT label (Subtle, Serious, Conventional, Concise, Corporate). */ type AgentRole = 'researcher' | 'copywriter' | 'graphic-designer' | 'ux-designer' | 'ux-writer' | 'editorial-designer' | 'social-media-designer' | 'creative-director' | 'design-engineer' | 'brand-strategist' | 'marketing-strategist' | 'print-designer' | 'motion-designer' | 'accessibility-specialist' | 'content-strategist' | 'seo-specialist'; declare const AGENT_ROLES: AgentRole[]; type PersonalityAxis = 'bold-subtle' | 'playful-serious' | 'experimental-conventional' | 'verbose-concise' | 'warm-corporate'; interface PersonalityAxisMeta { key: PersonalityAxis; leftLabel: string; rightLabel: string; } declare const PERSONALITY_AXES: PersonalityAxisMeta[]; interface PersonalityConfig { sliders: Record; /** Optional point budget for gamification (sum of |slider values| must not exceed this) */ pointBudget?: number; } declare const TRAIT_CATEGORIES: { readonly temperament: { readonly label: "Temperament"; readonly traits: readonly ["sassy", "chill", "intense", "nurturing", "provocative", "deadpan", "enthusiastic", "stoic"]; }; readonly workStyle: { readonly label: "Work Style"; readonly traits: readonly ["perfectionist", "fast-shipper", "big-picture", "detail-obsessed", "methodical", "chaotic-creative", "iterative", "one-shot"]; }; readonly social: { readonly label: "Social"; readonly traits: readonly ["extrovert", "introvert", "leader", "collaborator", "independent", "mentor", "challenger", "supporter"]; }; readonly mindset: { readonly label: "Mindset"; readonly traits: readonly ["thinking", "feeling", "judging", "perceiving", "optimist", "realist", "risk-taker", "cautious"]; }; }; type TraitCategory = keyof typeof TRAIT_CATEGORIES; type PersonalityTrait = typeof TRAIT_CATEGORIES[TraitCategory]['traits'][number]; /** Max traits allowed per category */ declare const MAX_TRAITS_PER_CATEGORY = 2; /** Flattened list of all valid trait values */ declare const PERSONALITY_TRAITS: readonly PersonalityTrait[]; declare const MAX_POINTS_PER_AGENT = 25; declare const MAX_TEAM_SIZE = 16; declare const MAX_TEAMS = 20; interface Agent { id: string; name: string; role: AgentRole; personality: PersonalityConfig; /** Selectable trait pills (e.g. 'sassy', 'perfectionist', 'challenger') */ traits: PersonalityTrait[]; /** Free-form user instructions for this agent */ customPrompt: string; /** Generated markdown combining baseline skill + personality injection */ skillFile: string; /** Pixabot avatar ID — 4-char base36 string. Renders via Pixabots API. */ pixabotId?: string; } interface Team { id: string; name: string; agents: Agent[]; createdAt: string; updatedAt: string; } /** Lightweight entry for index listing (fast listing without loading full team) */ interface TeamEntry { id: string; name: string; agentCount: number; updatedAt: string; } interface AgentRoleMeta { role: AgentRole; displayName: string; description: string; /** Semantic avatar key — mapped to actual image paths in the UI layer */ avatarKey: string; defaultPersonality: PersonalityConfig; /** Which agent skill markdown files to use as base (keys into AGENT_SKILL_CONTENT) */ baseSkillKeys: string[]; /** Hex color for UI badges */ color: string; } declare function uid(): string; declare function teamUid(): string; declare function createDefaultPersonality(): PersonalityConfig; declare const AGENT_NAMES: Record; declare function createDefaultAgent(role: AgentRole, meta?: AgentRoleMeta): Agent; declare function createDefaultTeam(name?: string): Team; declare function teamToEntry(team: Team): TeamEntry; interface EmotionalState { energy: number; confidence: number; enthusiasm: number; frustration: number; inspiration: number; } type EmotionKey = keyof EmotionalState; declare const EMOTION_KEYS: EmotionKey[]; declare const DEFAULT_EMOTIONAL_STATE: EmotionalState; /** Events that shift emotional state */ type EmotionalEvent = 'work_completed' | 'work_approved' | 'work_rejected' | 'creative_freedom' | 'repetitive_task' | 'conflicting_feedback' | 'clear_direction' | 'collaboration_win' | 'idle_recovery' | 'praised' | 'new_project'; declare const MEMORY_TYPES: readonly ["design_preference", "feedback", "relationship", "project_context", "skill_growth"]; type MemoryType = typeof MEMORY_TYPES[number]; interface AgentMemoryEntry { id: string; type: MemoryType; content: string; createdAt: string; lastRelevantAt: string; /** 0–1: how important this memory is (decays if not reinforced) */ salience: number; relatedAgentId?: string; projectId?: string; } interface AgentMemory { agentId: string; entries: AgentMemoryEntry[]; maxEntries: number; } declare const MAX_MEMORY_ENTRIES = 100; declare const MEMORY_SALIENCE_DECAY = 0.02; declare const MEMORY_MIN_SALIENCE = 0.1; type MessageType = 'chat' | 'design_handoff' | 'review_request' | 'review_response' | 'critique' | 'broadcast' | 'direction'; interface AgentMessage { id: string; from: string; to: string; type: MessageType; content: string; payload?: Record; timestamp: string; read: boolean; } interface AgentMailbox { agentId: string; inbox: AgentMessage[]; maxMessages: number; } declare const MAX_MAILBOX_MESSAGES = 50; interface AgentRelationship { agentA: string; agentB: string; collaborations: number; successfulCollabs: number; conflicts: number; synergyScore: number; bond: number; lastInteraction: string; sharedInsights: string[]; } interface RelationshipGraph { teamId: string; relationships: AgentRelationship[]; } interface AgentLivingState { emotions: EmotionalState; memory: AgentMemory; mailbox: AgentMailbox; tasksCompleted: number; tasksApproved: number; xp: number; level: number; lastActiveAt: string; } declare function createDefaultLivingState(agentId: string): AgentLivingState; /** XP thresholds for each level */ declare const LEVEL_THRESHOLDS: number[]; declare function xpToLevel(xp: number): number; /** * Personality Engine — bipolar sliders → descriptors → prompt fragments * * Scale: -5 to +5 (0 = neutral). * Negative = left label (Bold, Playful, Experimental, Verbose, Warm). * Positive = right label (Subtle, Serious, Conventional, Concise, Corporate). */ declare function validatePoints(config: PersonalityConfig): { valid: boolean; totalUsed: number; remaining: number; }; declare function redistributePoints(config: PersonalityConfig, changedAxis: PersonalityAxis, newValue: number): PersonalityConfig; type Intensity = 'low' | 'medium' | 'high'; declare function personalityToModifiers(config: PersonalityConfig): Record; /** * Check for emergent personality from axis combinations. * Returns a sentence if a combo fires, or empty string. */ declare function getAxisCombination(config: PersonalityConfig): string; declare function personalityToPromptFragment(config: PersonalityConfig, traits?: PersonalityTrait[], customPrompt?: string): string; /** * Convert a list of trait strings into a natural-sounding personality description. */ declare function traitToPersonalityDescription(traits: (PersonalityTrait | string)[]): string; declare function analyzeTeamTension(agents: Agent[]): { description: string; agentA: string; agentB: string; traitA: PersonalityTrait; traitB: PersonalityTrait; }[]; declare function getConvictionScore(traits: (PersonalityTrait | string)[]): number; declare function convictionToPromptFragment(conviction: number): string; declare function levelToPromptFragment(level: number): string; /** * Role Definitions — metadata for each AgentRole */ declare const AGENT_ROLE_DEFINITIONS: Record; declare const AGENT_ROLE_LIST: AgentRoleMeta[]; /** * Team Composition — coverage analysis, validation, summaries */ declare function analyzeTeamCoverage(team: Team): { coveredCapabilities: string[]; gaps: string[]; synergies: string[]; }; declare function validateTeam(team: Team): { valid: boolean; errors: string[]; }; declare function getTeamSummary(team: Team): string; /** * Team Presets — pre-built team configurations users can load instantly */ interface TeamPreset { id: string; name: string; description: string; emoji: string; roles: AgentRole[]; /** Per-role default traits for team chemistry. Keyed by index into roles array. */ roleTraits?: PersonalityTrait[][]; } declare const TEAM_PRESETS: TeamPreset[]; declare function createTeamFromPreset(preset: TeamPreset): Team; /** * Skill Generator — merges base skill markdown with personality injection */ /** * Generate the final skill file for an agent. * * @param agent - The agent to generate for * @param baseSkillContent - Map of role key → markdown content (from build-generated AGENT_SKILL_CONTENT) * @returns Final skill markdown with personality injected */ declare function generateSkillFile(agent: Agent, baseSkillContent: Record): string; /** * AUTO-GENERATED — do not edit manually. * Source: lib/agent-builder/skills/*.md * Generator: scripts/build-skills.mjs */ declare const AGENT_SKILL_CONTENT: Record; /** * AI Team Builder — generates prompts for AI-assisted team creation * and parses AI responses back into Team objects. */ declare const AI_BUILD_SUGGESTIONS: readonly ["A SaaS landing page for a fintech startup", "A complete rebrand for a sustainable fashion brand", "Social media campaign for a product launch", "A mobile app onboarding flow for a health app", "An e-commerce site redesign for a luxury watch brand", "A pitch deck for a Series A startup"]; declare function generateTeamBuildPrompt(projectDescription: string): string; declare function parseAITeamResponse(jsonString: string): Team | null; /** * Team Export — generate shareable markdown from a team configuration */ declare function teamToMarkdown(team: Team): string; /** * Emotional Model — agents have feelings that affect their creative output * * Emotions shift based on events (approval, rejection, collaboration wins) * and influence how agents approach design tasks. A confident agent takes * bigger creative risks. A frustrated agent pushes back or suggests pivots. * An inspired agent generates more divergent ideas. * * Zero Efecto imports — standalone. */ /** * Apply an emotional event to shift an agent's state. * All values stay clamped to 0–100. */ declare function applyEmotionalEvent(state: EmotionalState, event: EmotionalEvent): EmotionalState; /** * Apply natural decay/recovery over time (call once per session or daily). * - Energy drifts toward 70 (recovery) * - Frustration drifts toward 0 (cooling off) * - Enthusiasm drifts toward 50 (settling) * - Inspiration decays toward 30 (needs stimulation) * - Confidence stays relatively stable (only shifts on events) */ declare function applyEmotionalDecay(state: EmotionalState, hoursSinceLastActive: number): EmotionalState; type Mood = 'fired-up' | 'confident' | 'steady' | 'cautious' | 'drained' | 'frustrated' | 'inspired'; declare function getMood(state: EmotionalState): Mood; /** * Generate a prompt fragment that injects the agent's emotional state. * This subtly shifts how the agent approaches design work. */ declare function emotionToPromptFragment(state: EmotionalState): string; /** * Get a short display string for the agent's current mood. */ declare function getMoodEmoji(mood: Mood): string; /** * Calculate how emotional state should influence design decisions. * Returns modifiers that the prompt builder can use. */ declare function getDesignModifiers(state: EmotionalState): { riskTolerance: 'low' | 'medium' | 'high'; ideaDivergence: 'narrow' | 'moderate' | 'wide'; detailLevel: 'minimal' | 'standard' | 'thorough'; collaborationStyle: 'independent' | 'consultative' | 'leading'; }; /** * Memory System — agents learn and remember across sessions * * Each agent builds a personal knowledge base of design preferences, * user feedback, project context, and relationship observations. * Memories have salience that decays over time — important memories * get reinforced, stale ones get pruned. * * Zero Efecto imports — standalone. */ /** * Add a new memory entry. If at capacity, prunes lowest-salience entries first. */ declare function addMemory(memory: AgentMemory, type: MemoryType, content: string, opts?: { salience?: number; relatedAgentId?: string; projectId?: string; }): AgentMemory; /** * Reinforce an existing memory — bump its salience and update lastRelevantAt. * Call this when a memory proves useful (e.g., user confirms a preference). */ declare function reinforceMemory(memory: AgentMemory, memoryId: string, boost?: number): AgentMemory; /** * Apply salience decay based on time since last relevance. * Call this at session start to keep memories fresh. */ declare function decayMemories(memory: AgentMemory): AgentMemory; /** * Get memories of a specific type, sorted by salience (highest first). */ declare function getMemoriesByType(memory: AgentMemory, type: MemoryType): AgentMemoryEntry[]; /** * Get memories related to a specific agent (for relationship context). */ declare function getMemoriesAboutAgent(memory: AgentMemory, agentId: string): AgentMemoryEntry[]; /** * Get the most salient memories across all types (top-k). */ declare function getTopMemories(memory: AgentMemory, count?: number): AgentMemoryEntry[]; /** * Search memories by content (simple substring match). */ declare function searchMemories(memory: AgentMemory, query: string): AgentMemoryEntry[]; /** * Generate a prompt fragment from an agent's most important memories. * Injected into the system prompt so the agent "remembers" context. */ declare function memoryToPromptFragment(memory: AgentMemory, maxEntries?: number): string; /** * Given a user message and agent response, extract potential memories. * Returns suggested memories that the integration layer should store. * * This is a heuristic extractor — the integration layer can also use * the AI itself to extract richer memories. */ declare function extractPotentialMemories(userMessage: string, agentResponse: string): Array<{ type: MemoryType; content: string; salience: number; }>; /** * Inter-Agent Messaging — agents communicate via typed mailboxes * * Enables design pipeline workflows: agents hand off work, request reviews, * give critiques, and broadcast status updates. Inspired by Claude Code's * teammate mailbox pattern. * * Zero Efecto imports — standalone. */ /** * Create a new message. Does NOT deliver it — use `deliverMessage` for that. */ declare function createMessage(from: string, to: string, type: MessageType, content: string, payload?: Record): AgentMessage; /** * Deliver a message to a mailbox. Prunes old read messages if over capacity. */ declare function deliverMessage(mailbox: AgentMailbox, message: AgentMessage): AgentMailbox; /** * Deliver a broadcast message to multiple mailboxes. */ declare function deliverBroadcast(mailboxes: AgentMailbox[], message: AgentMessage): AgentMailbox[]; /** * Mark a message as read. */ declare function markRead(mailbox: AgentMailbox, messageId: string): AgentMailbox; /** * Mark all messages as read. */ declare function markAllRead(mailbox: AgentMailbox): AgentMailbox; /** * Get unread messages, newest first. */ declare function getUnread(mailbox: AgentMailbox): AgentMessage[]; /** * Get unread count. */ declare function getUnreadCount(mailbox: AgentMailbox): number; /** * Get messages of a specific type. */ declare function getMessagesByType(mailbox: AgentMailbox, type: MessageType): AgentMessage[]; /** * Get the conversation thread between two agents (both directions). */ declare function getThread(mailbox: AgentMailbox, otherAgentId: string): AgentMessage[]; /** * Generate a prompt fragment from an agent's unread messages. * Gives the agent context about what's happening in the team. */ declare function mailboxToPromptFragment(mailbox: AgentMailbox, agentNames?: Record): string; /** * Create a design handoff message (agent passes work to the next agent). */ declare function createHandoff(fromId: string, toId: string, description: string, designDecisions?: Record): AgentMessage; /** * Create a review request (agent asks another to review their work). */ declare function createReviewRequest(fromId: string, toId: string, description: string, context?: Record): AgentMessage; /** * Create a review response (approval, rejection, or revision request). */ declare function createReviewResponse(fromId: string, toId: string, approved: boolean, feedback: string): AgentMessage; /** * Create a creative direction message from the Creative Director. */ declare function createDirection(fromId: string, toId: string, direction: string): AgentMessage; /** * Relationship Graph — agent-to-agent bonds that compound over time * * Tracks how agents work together: collaboration count, success rate, * conflicts, synergy scores, and emotional bonds. Agents that work * well together develop stronger bonds and produce better results. * * Zero Efecto imports — standalone. */ /** * Get or create a relationship between two agents. */ declare function getRelationship(graph: RelationshipGraph, agentA: string, agentB: string): AgentRelationship; /** * Record a successful collaboration (work approved without revision). */ declare function recordCollaboration(graph: RelationshipGraph, agentA: string, agentB: string, successful: boolean, insight?: string): RelationshipGraph; /** * Record a conflict between agents (disagreed on approach). */ declare function recordConflict(graph: RelationshipGraph, agentA: string, agentB: string, resolved: boolean): RelationshipGraph; /** * Get all relationships for a specific agent, sorted by synergy score. */ declare function getAgentRelationships(graph: RelationshipGraph, agentId: string): AgentRelationship[]; /** * Get the strongest partner for an agent. */ declare function getBestPartner(graph: RelationshipGraph, agentId: string): AgentRelationship | null; /** * Get relationships that need attention (low bond, high conflict). */ declare function getTroubledRelationships(graph: RelationshipGraph): AgentRelationship[]; /** * Get the overall team health score (average synergy across all pairs). */ declare function getTeamHealth(graph: RelationshipGraph): number; /** * Generate a prompt fragment about this agent's relationships. * Helps the agent understand team dynamics when collaborating. */ declare function relationshipsToPromptFragment(graph: RelationshipGraph, agentId: string, agentNames: Record): string; /** * Apply natural bond decay over time. Unused relationships fade. */ declare function decayRelationships(graph: RelationshipGraph, daysSinceLastSession: number): RelationshipGraph; declare function createRelationshipGraph(teamId: string): RelationshipGraph; /** * Swarm — parallel multi-agent orchestration * * NOT a pipeline. Agents work simultaneously like a real team: * - Creative Director breaks the task into parallel assignments * - Multiple agents work at the same time on different artboards/sections * - CD reviews work as it comes in, not after everything's done * - Agents can be reassigned dynamically based on what the team needs * * Zero Efecto imports — standalone. */ interface SwarmTask { id: string; agentId: string; role: AgentRole; instruction: string; /** Which artboard this agent should work on (name, not ID — ID assigned at runtime) */ targetArtboard: string; status: 'pending' | 'active' | 'done'; /** Task IDs this depends on — ALL must be done before this starts */ afterIds: string[]; /** Execution phase: research = text-only, build = agentic loop, review = CD finishes, revise = builder responds to critique */ phase: 'research' | 'build' | 'review' | 'revise'; } interface Swarm { id: string; teamId: string; brief: string; tasks: SwarmTask[]; status: 'working' | 'done'; createdAt: string; } interface TaskTemplate { role: AgentRole; instruction: string; targetArtboard: string; /** Role name(s) of dependencies — this task waits for ALL tasks of these roles */ after?: string | string[]; /** Execution phase — defaults to 'build' */ phase?: 'research' | 'build' | 'review' | 'revise'; } interface SwarmTemplate { id: string; name: string; /** Patterns that trigger this template */ signals: string[]; patterns: RegExp[]; tasks: TaskTemplate[]; } declare function matchSwarmTemplate(userMessage: string): SwarmTemplate; interface CreateSwarmResult { swarm: Swarm; autoAddedAgents: Agent[]; } declare function createSwarm(userMessage: string, team: Team): CreateSwarmResult; /** * Get tasks that can start right now — parallel tasks with no pending deps. */ declare function getReadyTasks(swarm: Swarm): SwarmTask[]; /** * Mark a task as active. */ declare function startTask(swarm: Swarm, taskId: string): Swarm; /** * Mark a task as done. */ declare function completeTask(swarm: Swarm, taskId: string): Swarm; /** * Get swarm progress. */ declare function getSwarmProgress(swarm: Swarm): { done: number; total: number; active: number; percent: number; }; /** * Whether this task runs text-only (no design tools, single API call). */ declare function isTextOnlyPhase(task: SwarmTask): boolean; declare const BUILDER_ROLES: Set; /** * Build the prompt for a swarm task. * * Critical: non-builder agents (researcher, copywriter, CD) must NOT use * design tools. They produce TEXT output that builders use. Only designers * actually touch the canvas. */ declare function buildSwarmTaskPrompt(swarm: Swarm, task: SwarmTask, agent: Agent): string; /** * Scale Conversion Utilities * * Core uses -5 to +5 (bipolar, 0 = neutral). * Efecto historically used 0-10 with reversed polarity (10 = left label). * * Conversion: core = -(efecto - 5) = 5 - efecto * efecto = 5 - core */ /** Convert a single 0-10 (Efecto) value to -5/+5 (core) */ declare function scaleToCore(value010: number): number; /** Convert a single -5/+5 (core) value to 0-10 (Efecto) */ declare function scaleFromCore(valueBipolar: number): number; /** Convert an entire 0-10 PersonalityConfig to -5/+5 */ declare function configToCore(config010: { sliders: Record; maxPoints?: number; }): PersonalityConfig; /** Convert an entire -5/+5 PersonalityConfig to 0-10 */ declare function configFromCore(config: PersonalityConfig): { sliders: Record; maxPoints: number; }; /** * Lifecycle — the living loop that makes agents alive. * * High-level functions that update agent state in response to outcomes. * Composes emotions, memory, relationships, and XP into single calls. * * Used by: * - CLI (`designteam report`) * - Efecto (after swarm tasks) * - Any tool via @designteam/core */ type OutcomeType = 'completed' | 'approved' | 'rejected' | 'praised' | 'creative_freedom' | 'new_project'; interface ReportOutcome { type: OutcomeType; memory?: string; memoryType?: MemoryType; collaboratorId?: string; collaborationSuccessful?: boolean; collaborationInsight?: string; } interface ReportResult { state: AgentLivingState; graph: RelationshipGraph; xpGained: number; leveledUp: boolean; oldLevel: number; newLevel: number; mood: string; } /** * Report an outcome for an agent. * Handles XP, emotions, level-up, memory, relationships in one call. * Pure function — takes state in, returns new state out. Caller persists. */ declare function reportOutcome(state: AgentLivingState, graph: RelationshipGraph, agentId: string, outcome: ReportOutcome): ReportResult; /** * Apply time-based decay to agent state. * Call on every read (roster, status, check) to keep state fresh. * Pure function — caller persists. */ declare function applyDecay(state: AgentLivingState, graph: RelationshipGraph): { state: AgentLivingState; graph: RelationshipGraph; }; declare function reinforceAgentMemory(state: AgentLivingState, memoryId: string, boost?: number): AgentLivingState; declare function inferMemoryType(content: string): MemoryType; /** * Team Memory — shared knowledge every agent on the team can read. * * Distinct from AgentMemory (which is per-agent). Team memory holds: * - brand facts (colors, voice, typography) * - project context (audience, deadlines, constraints) * - user preferences (style, taste, past feedback) * - team decisions ("we tried X, user didn't like it") * * Salience decays like agent memory. Any agent can read; typically * the Creative Director or user writes. */ declare const TEAM_MEMORY_CATEGORIES: readonly ["brand", "project", "user", "decision", "fact"]; type TeamMemoryCategory = typeof TEAM_MEMORY_CATEGORIES[number]; interface TeamMemoryEntry { id: string; category: TeamMemoryCategory; content: string; salience: number; source?: string; createdAt: string; lastRelevantAt: string; } interface TeamMemory { teamId: string; entries: TeamMemoryEntry[]; maxEntries: number; } declare const MAX_TEAM_MEMORY_ENTRIES = 200; declare const TEAM_MEMORY_SALIENCE_DECAY = 0.01; declare const TEAM_MEMORY_MIN_SALIENCE = 0.1; declare function createEmptyTeamMemory(teamId: string): TeamMemory; declare function addTeamMemory(memory: TeamMemory, category: TeamMemoryCategory, content: string, opts?: { salience?: number; source?: string; }): TeamMemory; declare function reinforceTeamMemory(memory: TeamMemory, memoryId: string, boost?: number): TeamMemory; declare function decayTeamMemory(memory: TeamMemory): TeamMemory; declare function getTeamMemoriesByCategory(memory: TeamMemory, category: TeamMemoryCategory): TeamMemoryEntry[]; declare function getTopTeamMemories(memory: TeamMemory, n?: number): TeamMemoryEntry[]; declare function searchTeamMemories(memory: TeamMemory, query: string, limit?: number): TeamMemoryEntry[]; /** Format team memory for injection into an agent's system prompt. */ declare function teamMemoryToPromptFragment(memory: TeamMemory, maxEntries?: number): string; /** * User Profile — who the user is, what they care about. * * Stored locally in `.designteam/user.json` (optionally synced to Supabase * if logged in). Every agent reads this to tailor their work to the user. */ interface UserProfile { /** User's name or handle */ name?: string; /** Business or product name */ business?: string; /** One-line description of what the business does */ businessDescription?: string; /** Industry (B2B SaaS, e-commerce, etc.) */ industry?: string; /** Target audience */ audience?: string; /** Primary goals (growth, retention, brand awareness, etc.) */ goals?: string[]; /** Voice/tone preferences */ voice?: string; /** Visual style preferences */ style?: string; /** Brand colors, if any */ brandColors?: string[]; /** Free-form notes */ notes?: string; /** ISO 8601 — last time the profile was updated */ updatedAt: string; } declare function createEmptyUserProfile(): UserProfile; declare function updateUserProfile(profile: UserProfile, updates: Partial): UserProfile; /** Format the user profile for injection into agent system prompts. */ declare function userProfileToPromptFragment(profile: UserProfile): string; /** * Auto Memory Extraction — stop making users type --memory. * * Given a work context (what the agent did, the user's feedback, the task * description), extract memories and categorize them: * - agent memory: things just this agent should remember * - team memory: things the whole team should know * * Gated behind an optional Anthropic API key. Falls back to heuristic * categorization when no AI is available. */ interface ExtractionContext { /** Who did the work (e.g., "Scout", "Pixel") */ agentName: string; /** The agent's role (e.g., "researcher") */ agentRole: string; /** The user's raw input — what they said happened or what they want remembered */ userInput?: string; /** Optional task description for richer context */ taskDescription?: string; /** Optional outcome (approved/rejected/praised/completed) */ outcome?: string; } interface ExtractedMemory { /** Which bucket this goes in */ scope: 'agent' | 'team'; /** Original content */ content: string; /** Agent memory type (used when scope = 'agent') */ agentType?: MemoryType; /** Team memory category (used when scope = 'team') */ teamCategory?: TeamMemoryCategory; /** 0–1 */ salience: number; } /** * AI-powered extraction via Anthropic Claude Haiku. * Requires ANTHROPIC_API_KEY in env. Returns [] on failure or no key. */ declare function extractMemoriesWithAI(ctx: ExtractionContext, apiKey?: string): Promise; /** Parse Haiku's JSON output, tolerant of minor formatting. Exported for testing. */ declare function parseExtractionJSON(text: string): ExtractedMemory[]; /** * Heuristic fallback when no AI is available. Categorizes a memory as * agent- or team-scope based on keyword patterns. Order matters — * brand wins over user-pref, user-pref wins over decision, etc. */ declare function categorizeHeuristic(content: string): ExtractedMemory; /** * Pixabots Avatars — single source of truth for per-role pixel-art avatar IDs. * * Stable pixabotIds per role so the same role always shows the same character * across designteam app, Efecto agent panel, CLI, etc. Consumers build the * final URL as `${PIXABOTS_API}/${id}?size=`. */ declare const PIXABOTS_API = "https://pixabots.com/api/pixabot"; /** Stable pixabotIds per role — consistent character identity across all consumers. */ declare const ROLE_PIXABOT_IDS: Record; /** Build a Pixabots URL for the given id and size. */ declare function pixabotUrl(pixabotId: string, size?: number): string; /** Resolve a Pixabots URL for a role, or null if role has no stable id. */ declare function pixabotUrlForRole(avatarKey: string, size?: number): string | null; export { AGENT_NAMES, AGENT_ROLES, AGENT_ROLE_DEFINITIONS, AGENT_ROLE_LIST, AGENT_SKILL_CONTENT, AI_BUILD_SUGGESTIONS, type Agent, type AgentLivingState, type AgentMailbox, type AgentMemory, type AgentMemoryEntry, type AgentMessage, type AgentRelationship, type AgentRole, type AgentRoleMeta, BUILDER_ROLES, type CreateSwarmResult, DEFAULT_EMOTIONAL_STATE, EMOTION_KEYS, type EmotionKey, type EmotionalEvent, type EmotionalState, type ExtractedMemory, type ExtractionContext, LEVEL_THRESHOLDS, MAX_MAILBOX_MESSAGES, MAX_MEMORY_ENTRIES, MAX_POINTS_PER_AGENT, MAX_TEAMS, MAX_TEAM_MEMORY_ENTRIES, MAX_TEAM_SIZE, MAX_TRAITS_PER_CATEGORY, MEMORY_MIN_SALIENCE, MEMORY_SALIENCE_DECAY, MEMORY_TYPES, type MemoryType, type MessageType, type Mood, type OutcomeType, PERSONALITY_AXES, PERSONALITY_TRAITS, PIXABOTS_API, type PersonalityAxis, type PersonalityAxisMeta, type PersonalityConfig, type PersonalityTrait, ROLE_PIXABOT_IDS, type RelationshipGraph, type ReportOutcome, type ReportResult, type Swarm, type SwarmTask, TEAM_MEMORY_CATEGORIES, TEAM_MEMORY_MIN_SALIENCE, TEAM_MEMORY_SALIENCE_DECAY, TEAM_PRESETS, TRAIT_CATEGORIES, type Team, type TeamEntry, type TeamMemory, type TeamMemoryCategory, type TeamMemoryEntry, type TeamPreset, type TraitCategory, type UserProfile, addMemory, addTeamMemory, analyzeTeamCoverage, analyzeTeamTension, applyDecay, applyEmotionalDecay, applyEmotionalEvent, buildSwarmTaskPrompt, categorizeHeuristic, completeTask, configFromCore, configToCore, convictionToPromptFragment, createDefaultAgent, createDefaultLivingState, createDefaultPersonality, createDefaultTeam, createDirection, createEmptyTeamMemory, createEmptyUserProfile, createHandoff, createMessage, createRelationshipGraph, createReviewRequest, createReviewResponse, createSwarm, createTeamFromPreset, decayMemories, decayRelationships, decayTeamMemory, deliverBroadcast, deliverMessage, emotionToPromptFragment, extractMemoriesWithAI, extractPotentialMemories, generateSkillFile, generateTeamBuildPrompt, getAgentRelationships, getAxisCombination, getBestPartner, getConvictionScore, getDesignModifiers, getMemoriesAboutAgent, getMemoriesByType, getMessagesByType, getMood, getMoodEmoji, getReadyTasks, getRelationship, getSwarmProgress, getTeamHealth, getTeamMemoriesByCategory, getTeamSummary, getThread, getTopMemories, getTopTeamMemories, getTroubledRelationships, getUnread, getUnreadCount, inferMemoryType, isTextOnlyPhase, levelToPromptFragment, mailboxToPromptFragment, markAllRead, markRead, matchSwarmTemplate, memoryToPromptFragment, parseAITeamResponse, parseExtractionJSON, personalityToModifiers, personalityToPromptFragment, pixabotUrl, pixabotUrlForRole, recordCollaboration, recordConflict, redistributePoints, reinforceAgentMemory, reinforceMemory, reinforceTeamMemory, relationshipsToPromptFragment, reportOutcome, scaleFromCore, scaleToCore, searchMemories, searchTeamMemories, startTask, teamMemoryToPromptFragment, teamToEntry, teamToMarkdown, teamUid, traitToPersonalityDescription, uid, updateUserProfile, userProfileToPromptFragment, validatePoints, validateTeam, xpToLevel };