Create shared.ts with common configuration types that can be used
across agent-core and zee gateway:
- Session primitives: SessionScope, ReplyMode, TypingMode, ReplyToMode
- Policy types: DmPolicy, GroupPolicy
- Logging: LogLevel, ConsoleStyle, LoggingConfig
- Network: RetryConfig, BindMode
- Model/Provider: ModelApi, ModelDefinition, ProviderDefinition
- Processing: ThinkingLevel, QueueMode, QueueDropPolicy
Update types.ts to use shared primitives:
- GeneralSettings.logLevel now uses shared LogLevel
- WhatsAppConfig extended with dmPolicy, groupPolicy, allowFrom, retry
- TelegramConfig extended with dmPolicy, groupPolicy, allowFrom, retry
This is the first step toward config consolidation between agent-core
and zee gateway, enabling type-safe sharing of common configuration.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- bun run works more reliably for spawning child processes
- npx tsx has PATH issues when spawned as subprocess
- Enable all persona MCP servers by default
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements three MCP servers that expose persona capabilities to external
tools via the Model Context Protocol:
- personas-memory: Qdrant-backed semantic memory (store, search, list, delete, stats)
- personas-calendar: Google Calendar integration (events, create, update, delete, free slots, quick add)
- personas-portfolio: Financial tools bridging to Stanley CLI (portfolio, market data, SEC filings, research, backtest)
Each server uses @modelcontextprotocol/sdk with Zod schemas for type-safe
tool definitions and stdio transport for local process communication.
Config entries added (disabled by default):
- "personas-memory": npx tsx src/mcp/servers/memory.ts
- "personas-calendar": npx tsx src/mcp/servers/calendar.ts
- "personas-portfolio": npx tsx src/mcp/servers/portfolio.ts
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Mark existing TUI improvements as complete:
- Favorites system in model selector
- Recently used models tracking
- Cost display (Free badge)
- Persistent agent state via ContinuityManager
- Better compaction summaries via continuity.ts
Remaining Phase 4 items:
- Provider status indicators
- Agent-specific themes/colors
- Agent handoff
- Conversation branching/export
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Mark Phase 3.1 Memory System as COMPLETE:
- Qdrant vector storage with full CRUD
- MemoryStore high-level API
- BGE-M3 embeddings via vLLM
- ContinuityManager for session persistence
- Cross-persona memory sharing with namespaces
Mark Phase 3.2 Orchestration as COMPLETE:
- Orchestrator with full worker lifecycle
- WezTerm pane management
- Tiara/SPARC integration
- DroneWaiter for async completion
- Fact extraction hooks
Remaining: MCP servers for external tool exposure
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Auth.refreshToken() to refresh a specific provider's token
- Add Auth.refreshAllExpiring() to refresh all tokens expiring within 10 min
- Add Auth.status() to get token validity info for all providers
- Add Auth.isExpiringSoon() and Auth.isExpired() helpers
- Call refreshAllExpiring() during provider initialization
Supported providers: anthropic, openai
Note: google/antigravity uses plugin-handled custom flow
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Disable google-vertex and google-vertex-anthropic (redundant with Antigravity)
- Remove non-working antigravity provider config
- Use built-in antigravity-* models from provider.ts
- Add zee, stanley, johny agent definitions
- Update compaction to use google/antigravity-gemini-3-flash
- Update johny.md to use google/antigravity-claude-opus-4-5-thinking
- Remove top_p from agent files (handled by ProviderTransform)
- Add docs/PROVIDERS.md with provider setup documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add topP: 0.95 to antigravity Claude thinking model definitions
- Add topP check in transform.ts for claude+thinking models
- Wrap plugin fetch to remove x-goog-api-key header (conflicts with OAuth)
- Add createEffect to properly initialize agent selection on load
- Update CLAUDE.md with binary update process documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add favorite property to model store and favorite() method required
by dialog-model.tsx after upstream merge.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The google-antigravity provider was redundant - the opencode-antigravity-auth
plugin already handles OAuth, request transformation, and API calls through
the standard 'google' provider.
Testing confirmed google/gemini-2.5-flash works via the plugin:
bun run ./src/index.ts run --model google/gemini-2.5-flash "Say hello"
Changes:
- Remove google-antigravity custom loader and provider definition
- Remove antigravity.ts token refresh helper (unused)
- Keep auth OAuth passthrough for extra fields like projectId, email
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix API message format: use `parts` array instead of `content`
- Add `agent` parameter to route messages to correct persona
- Add `x-opencode-directory` header for proper session handling
- Same fixes as WhatsApp gateway
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix model selection not persisting across restarts by saving/loading
the model field in model.json (was only saving recent and variant)
- Call save() on every model change, not just when adding to recents
- Add google-antigravity provider for free Gemini access via OAuth
- Create antigravity.ts helper for token refresh via antigravity proxy
- Provider inherits all Google models but marks them as free (cost: 0)
- Auto-refresh tokens with 5-minute buffer before expiry
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- WhatsApp is exclusively Zee's channel using GLM 4.7 via Z.ai (cerebras)
- Remove persona detection patterns (Stanley/Johny use Telegram instead)
- Fix API message format: use `parts` array instead of `content`
- Add `agent` parameter to route messages to correct persona
- Add `x-opencode-directory` header for proper session handling
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Terminal QR codes can be distorted by font size/line height. Save QR as
PNG file that can be opened with an image viewer for reliable scanning.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update CLI to use agent-core naming consistently so it can be installed
and run globally without confusion with upstream opencode project.
- Update yargs scriptName to agent-core
- Add AGENT_CORE env var (keep OPENCODE for backwards compat)
- Update build to output agent-core binary
- Update bin shim to find both agent-core-* and opencode-* packages
- Update all command descriptions to use agent-core
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The web package still referenced the old "opencode" workspace name,
causing bun install to fail with "Workspace dependency not found".
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Users must be able to run both agent-core and OpenCode without
confusion. All new code, docs, and user-facing text should use
'agent-core' naming instead of 'opencode'.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- New WhatsApp gateway using whatsapp-web.js
- QR code authentication on first run
- Session persistence across restarts
- Intent-based persona routing (same as Telegram)
- Phone number allowlist support
- Integrated into daemon with --whatsapp flag
Usage:
opencode daemon --whatsapp --port 4567
Note: Requires whatsapp-web.js and qrcode-terminal packages.
Dynamic imports allow graceful failure if not installed.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
sync.data.todo is only populated when sessions are opened, so the
startup check was always finding zero todos. Now uses Todo.get()
to read directly from storage for each session.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 0.3 completion:
- Show toast on TUI startup if any sessions have incomplete todos
- Display count: "◐ N pending todos in M sessions"
- Update roadmap: mark Phase 0 as Complete
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Filter out cancelled todos (consistency with other implementations)
- Update display to use ◐ symbol: "◐ N pending · task..."
- Mark Phase 0.2 TUI Integration as complete in roadmap
The prompt hint was already implemented, this commit improves it
for consistency with the session list indicator.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The todo continuation reminder was already implemented in prompt.ts
at insertReminders() (lines 1180-1219). Updates roadmap to reflect this.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When switching between sessions in the TUI:
- Shows toast warning with count of incomplete todos
- Session list displays ◐{count} indicator for sessions with pending work
This helps users track unfinished tasks across sessions.
Updates roadmap Phase 0.2 TUI Integration status.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When using the placeholder agent (before real agents load), return
undefined instead of falling back to the first provider's model.
This prevents showing google-vertex-anthropic models before the
agent's configured model loads.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove disabled: true from agent_cycle and agent_cycle_reverse
- Remove disabled: true from mode_toggle
- Tab now switches between agents as expected
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Return a placeholder agent object when no agents have loaded yet,
preventing crashes when accessing .name or other properties on
undefined.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When agents haven't loaded yet or the stored agent name doesn't match
any loaded agent, fallback to the first available agent instead of
returning undefined which caused crashes.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Agent-configured models (like cerebras/zai-glm-4.7) may not be in the
provider list returned by the API. Instead of validating and falling
back, trust the agent's configured model directly.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Agent's model config now takes priority:
1. Agent's configured model (from .agent-core/agent/*.md)
2. User's cached selection (for agents without config)
3. Global fallback
This ensures personas always use their intended models on startup.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The {skill:zee} placeholder was never implemented - it was being sent
as literal text. Now each agent has its actual prompt inlined:
- Zee: Personal life assistant (memory, messaging, calendar)
- Stanley: Investing system (markets, portfolio, SEC filings)
- Johny: Learning system (knowledge graph, spaced repetition)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Delete unused prompt files (anthropic-20250930.txt, copilot-gpt-5.txt, explore.txt)
- Fix thread.ts to use AGENT_CORE_ORIGINAL_PWD for correct cwd detection
- Remove misleading tips about non-existent vim features (:w, :wq, :help)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The 'includes' field (for skill loading) was being passed to providers
like Cerebras, causing "body.includes is unsupported" errors.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Parse all Claude naming formats (old/new with/without minor version)
- Prioritize highest version number over -latest suffix
- Group by model family (opus, sonnet, haiku) and keep only best version
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Auto-hide dated model versions (e.g. claude-opus-4-5-20250202) when
latest or base version exists for Anthropic and Z.AI providers
- Remove variant cycle command from agent options
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Change command prefix from / to : (vim-style, e.g. :connect, :models)
- Update tips with vim commands (:w, :q, :wq, :help)
- Update branding from OpenCode to agent-core in sidebar
- Update footer hints to use : prefix
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Simplify the UI by removing:
- Model favorites (toggleFavorite, favorite list, Ctrl+F keybind)
- Suggested commands category in command palette
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Cerebras provider with GLM-4.7 model
- Context: 131K tokens, Output: 40K tokens
- Supports reasoning and tool calls
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace AGENT-CORE logo with dynamic persona ASCII art
- Logo now shows Zee, Stanley, or Johny based on active persona
- Remove OpenRouter warning dialog (was promoting OpenCode Zen)
- Update CLI logo to show Zee banner (default persona)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Rename packages/opencode to packages/agent-core
- Update bin entry from opencode to agent-core
- Set default_agent to "zee" for persona-first UX
- Update terminal title to show current persona name
- Fix persona colors:
- Zee: #2563EB (blue)
- Stanley: #059669 (emerald green)
- Johny: #DC2626 (red)
- Update all documentation and build script references
- Update root package.json name and dev script
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 0.2 of Always-On Personas architecture:
- Add toast notification on session switch when incomplete todos exist
(routes/session/index.tsx)
- Inject system reminder into LLM context for incomplete tasks
(session/prompt.ts)
- Add visual hint in prompt area showing current todo progress
(component/prompt/index.tsx)
- Create architecture roadmap for Always-On Personas system
(docs/architecture/ALWAYS-ON-PERSONAS.md)
This enables automatic continuation of incomplete tasks when:
1. Switching to a session with pending todos (toast + hint)
2. Sending any prompt in a session with incomplete tasks (system reminder)
Part of the headless agent infrastructure for remote access via Zee.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Session restore now automatically triggers todo continuation
when incomplete tasks remain from previous session.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New features in tiara:
- Todo continuation hook system for automatic session persistence
- System reminder injection when incomplete tasks remain
- CLI command: npx claude-flow hook todo-continuation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>