Commit Graph

7731 Commits

Author SHA1 Message Date
Artur Do Lago 3e9fbfa5ef refactor(memory): unify memory abstraction into single Memory class
Consolidate 4-layer memory abstraction into unified Memory class:
- MemoryStore, QdrantMemoryStore, QdrantMemoryBridge, ContinuityManager
  are now consolidated into a single src/memory/unified.ts

Single Qdrant collection with type field for discrimination:
- type: "memory" - facts, preferences, decisions
- type: "state" - personas orchestration state
- type: "conversation" - conversation continuity
- type: "session_chain" - session chain index

Key changes:
- New Memory class with save/search/get/delete for memories
- State persistence (saveState/loadState)
- Conversation continuity (startSession, processMessages, etc.)
- Cross-session memory injection for personas bootstrap
- Updated tiara.ts to use Memory instead of QdrantMemoryBridge
- Added bootstrap/personas.ts for lifecycle hooks

Legacy APIs preserved for backwards compatibility.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:45:39 +01:00
Artur Do Lago 3041400947 refactor(config): centralize infrastructure constants
Create src/config/constants.ts with centralized values for:
- Qdrant URL and collection names
- Embedding model and dimensions
- Timeout values (drone, IPC, fact extraction, provider)
- Memory configuration limits

Update all consumers to import from constants instead of
using hardcoded values:
- src/personas/memory-bridge.ts
- src/personas/tiara.ts
- src/personas/drone-wait.ts
- src/personas/fact-extractor.ts
- src/memory/qdrant.ts
- src/memory/store.ts
- src/config/types.ts
- src/daemon/ipc-client.ts

All constants support env var override via QDRANT_URL etc.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:45:39 +01:00
Artur Do Lago c06374265b fix(config): remove hardcoded ports and URLs
- Unify server port to use DEFAULT_API_PORT (3456) constant
- Make Qdrant URL configurable via QDRANT_URL env var in debug commands
- Fix plugin baseUrl to derive from Server.url() instead of hardcoded
- Update CLI help text to show correct default port
- Fix MDNS service name from opencode to agent-core

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:45:39 +01:00
Artur Do Lago 5095bc0dff fix(interfaces): resolve 8 critical bugs across web/tiara/persona layers
P0 Critical Fixes:
- Fix import ./tiara → ./claude-flow in plugin/builtin/index.ts
- Create AgentOrchestrator type bridge for council/tiara integration (src/tiara.ts)
- Fix hardcoded state ID in memory-bridge.ts (was causing cross-persona data loss)

P1 Core Functionality:
- Add persona isolation to memory bridge namespace (personas now have private memory)
- Load SKILL.md content into drone prompts (skills now available to drones)
- Inject persona-specific tools from AGENT_CONFIGS into drone prompts

P2 API Consistency:
- Standardize error response format in server.ts (MCP & gateway endpoints)
- WebSocket param validation already in place (verified)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:45:39 +01:00
Artur Do Lago 3936b15dbf fix(naming): replace opencode with agent-core in user-facing text
- scripts/systemd/install.sh: fix help text CLI commands
- cli/cmd/pr.ts: fix spawned command and messages
- cli/error.ts: fix MCP and model error messages
- cli/cmd/uninstall.ts: also detect "# agent-core" in shell profiles

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:45:39 +01:00
Artur Do Lago d61b2cfa60 fix(types): resolve TypeScript errors blocking pre-push hook
- LogMeta: change to Record<string, any> for flexibility
- WhatsApp: add WhatsAppChat interface with sendStateTyping
- debug/index.ts: fix FlagsCommand to work without ALL_FLAGS
- debug/memory.ts: fix Qdrant property names and import path
- footer.tsx: remove incomplete provider_auth_status feature
- dialog-model.tsx: remove incomplete auth status feature
- thread.ts: fix Error handling in log calls
- session/index.ts: fix Error handling in log call
- llm-provider.ts: define types inline (SDK no longer exports)
- memory/store.ts: ensure required Qdrant config fields
- whatsapp.test.ts: simplify disconnect test assertion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:45:39 +01:00
Artur Do Lago 5bf90ca31b feat(surface): add showThinking capability for platform-aware thinking visibility
- Add showThinking to SurfaceCapabilities type
- Set showThinking=true for CLI, Web, API (user toggleable)
- Set showThinking=false for WhatsApp, Telegram (locked to hide)
- Messaging platforms never show thinking/reasoning output

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:43:28 +01:00
Artur Do Lago 8c06aa3707 fix: technical debt cleanup (Sprints 6-10)
Sprint 6 - Gateway Stability:
- Add exponential backoff to Telegram poll loop
- Fix process timeout with SIGKILL
- Add fetch timeouts with AbortController to all HTTP calls
- Fix WhatsApp init race condition
- Add WhatsApp event listener cleanup tracking

Sprint 7 - Error Visibility:
- Fix silent error catches in share, canvas-tool, council, qdrant
- Replace console.log with structured logging across surface, browser, mcp
- Add JSON validation with zod for config and API responses

Sprint 8 - Type Safety:
- Define LogMeta type to replace Record<string, any>
- Add WhatsApp type guards (isChatMessage, isValidPersona)
- Create util/net.ts with shared helpers

Sprint 9 - Test Coverage:
- Create WhatsApp API mock for testing
- Add WhatsApp gateway tests (13 tests passing)
- Export mocks from test/mock/index

Sprint 10 - Debug Ergonomics:
- Fix fact extraction getSessionContent to retrieve actual messages
- Enhance debug memory search with semantic search
- Add debug errors command with follow mode

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:41:11 +01:00
Artur Do Lago 75f723b021 fix(plugin): add Instance.provide context and validate cache
- Wrap CLI commands in Instance.provide for proper Config access
- Validate registry cache file against schema before use
- Prevents crash when Config.update() is called without Instance context

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:39:20 +01:00
Artur Do Lago 16f52f9b2f docs: mark plugin marketplace as complete in roadmap
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:39:20 +01:00
Artur Do Lago a07e70e86c feat(plugin): add plugin marketplace with CLI commands
Add plugin discovery and management system:
- Registry index (plugins/index.json) with curated plugins
- Registry client with caching and fallback
- Plugin manager for install/remove operations
- CLI commands: plugin search, list, install, remove, info

Registry hosted as static JSON, uses existing npm/Bun infrastructure.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:39:20 +01:00
Artur Do Lago da907e3749 docs: mark voice output (TTS) as complete in roadmap
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:39:20 +01:00
Artur Do Lago 4d057d25e3 feat(gateway): add TTS voice output support
Add text-to-speech capability to Telegram and WhatsApp gateways:
- TTSConfig interface with CLI command template system
- Template variables: {{Text}}, {{OutputPath}}, {{Voice}}
- sendVoice methods for synthesizing and sending audio
- Graceful fallback to text if TTS fails or not configured

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:39:20 +01:00
Artur Do Lago 8a2440d640 feat(canvas): add visual reasoning canvas types
Add three new canvas kinds for visual reasoning in WezTerm:
- diagram: flowcharts, architecture diagrams with box/diamond/oval nodes
- graph: nodes and edges with colors and weights (knowledge graphs)
- mindmap: hierarchical tree view for thinking/planning

Canvas features:
- ASCII art rendering with ANSI colors
- Works alongside nvim/LSP in WezTerm panes
- 67% width ratio (Claude:Canvas = 1:2)
- Reusable pane management

Updated tools with new kinds and config documentation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:39:20 +01:00
Artur Do Lago d627583dc4 docs: mark technical debt items as complete in roadmap
All Phase 7 technical debt items completed:
- opencode references consolidated
- Type safety for persona configs
- Provider transform tests verified (3200+ lines)
- Auth E2E tests added (44 tests)
- Auth storage paths consolidated

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:39:20 +01:00
Artur Do Lago d9ff1940cc test(auth): add comprehensive auth module tests
- Test pure functions: isExpiringSoon, isExpired
- Test file operations: get, all, set, remove
- Test status checking for multiple providers
- Test schema validation for OAuth, API, WellKnown types
- Test edge cases: missing files, invalid JSON, extra fields

44 tests covering auth storage and validation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:39:20 +01:00
Artur Do Lago 2ae7f0596f feat(surface): add showThinking capability for platform-aware thinking visibility
- Add showThinking to SurfaceCapabilities type
- Set showThinking=true for CLI, Web, API (user toggleable)
- Set showThinking=false for WhatsApp, Telegram (locked to hide)
- Messaging platforms never show thinking/reasoning output

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:39:20 +01:00
Artur Do Lago 97e3f275fb feat(surface): add showThinking capability for platform-aware thinking visibility
- Add showThinking to SurfaceCapabilities type
- Set showThinking=true for CLI, Web, API (user toggleable)
- Set showThinking=false for WhatsApp, Telegram (locked to hide)
- Messaging platforms never show thinking/reasoning output

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:39:20 +01:00
Artur Do Lago aa17f25388 refactor(personas): improve type safety for persona configs
- Rename PersonaConfig → OrchestrationPersona in personas/types.ts
  to avoid confusion with agent/persona.ts:PersonaConfig
- Rename PERSONAS_CONFIGS → ORCHESTRATION_PERSONAS for clarity
- Remove duplicate inline configs in persona.ts, use shared constant
- getPersonaConfig now returns OrchestrationPersona type

Eliminates config duplication and clarifies type naming.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:39:20 +01:00
Artur Do Lago cb30a15508 refactor: consolidate naming from opencode to agent-core
- Change comments and commands in new code to use "agent-core"
- Rename OAUTH_DUMMY_KEY to agent-core-oauth-dummy-key
- Add AGENT_CORE_TEST_HOME env var (with OPENCODE_TEST_HOME compat)
- Keep external service URLs (opencode.ai, antigravity.opencode.ai)
- Keep OPENCODE_* flags for upstream compatibility

Part of technical debt cleanup (Phase 7).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:39:20 +01:00
Artur Do Lago a3ff063bcc feat(api): complete Phase 6 cross-platform integration
Add comprehensive cross-platform APIs for web/mobile integration:

Server endpoints:
- GET /sync?since=<ts> - Delta sync for offline clients
- GET /personas - List personas with capabilities and gateway status
- GET /themes - List available themes (built-in + persona-specific)
- GET /preferences/theme - Get current theme
- PATCH /preferences/theme - Set theme

Telegram gateway:
- Add voice note transcription support via configurable CLI
- Download voice/audio files from Telegram API
- Transcribe using {{MediaPath}} template command

Documentation:
- Update CROSS-PLATFORM.md with all new API endpoints
- Mark Phase 6 as complete in ROADMAP.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:39:20 +01:00
Artur Do Lago 3cb5fe1f6f feat(api): add cross-platform integration APIs for Phase 6
- Add SSE endpoints for real-time session sync:
  - GET /events - global event stream for all sessions
  - GET /session/:id/events - per-session event stream
  - Events: session.created/updated/deleted, message.updated, todo.updated, status changes
  - 30-second keepalive heartbeat

- Add session handoff API:
  - POST /session/:id/handoff - prepare session for transfer to another platform
  - Returns session context, last message, todos, and deep link URL
  - Supports: mobile, web, cli, telegram, whatsapp targets

- Add unified notification endpoint:
  - POST /notify - send notifications across platforms
  - Supports Telegram and WhatsApp broadcast
  - Includes deep linking to sessions

- Add docs/CROSS-PLATFORM.md with:
  - Architecture overview
  - API documentation
  - Integration patterns for mobile/web
  - Deep linking scheme (agentcore://)
  - Offline support guidance

- Update ROADMAP.md marking Phase 6.2 as complete

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:37:35 +01:00
Artur Do Lago 4e08a34ff1 feat(sync): complete Phase 5 upstream sync infrastructure
- Add .github/workflows/upstream-sync.yml for weekly upstream checks
  - Scheduled weekly on Mondays
  - Manual trigger with optional PR creation
  - Conflict detection in workflow summary
- Add scripts/validate-sync.sh for post-merge validation
  - Checks critical persona files exist
  - Validates agent-core naming preserved
  - Verifies persona themes registered
  - TypeScript compilation check
- Update ROADMAP.md marking Phase 5 as complete
- Remove Electron/browser extension from backlog (TUI is our desktop app)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:34:57 +01:00
Artur Do Lago 58c09c52c4 feat(sync): add upstream sync infrastructure for Phase 5
- Add scripts/check-upstream.sh for tracking upstream OpenCode releases
- Add scripts/sync-upstream.sh for merging/rebasing upstream changes
- Create patches/agent-core/ structure for documenting divergences
- Add docs/UPSTREAM-SYNC.md with comprehensive sync guide
- Update ROADMAP.md with Phase 5.1 progress and Phase 6 cross-platform plan

Currently 82 commits ahead, 23 behind upstream (sst/opencode dev branch).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:34:57 +01:00
Artur Do Lago f87be4c23e docs: mark Phase 4 TUI Improvements as complete
All Phase 4 items implemented:
- 4.1 Model Selection: favorites, recents, auth indicators, cost display
- 4.2 Agent Experience: themes, persistent state, delegation
- 4.3 Conversation: compaction, branching, export

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:34:57 +01:00
Artur Do Lago 983e17b985 feat(tui): add visual branch tree and breadcrumb navigation
- Add Branches section to sidebar showing parent/siblings/children
- Clickable branch items to navigate between related sessions
- Add breadcrumb trail in header showing session ancestry
- Clickable ancestors to jump up the session tree

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:34:57 +01:00
Artur Do Lago 11538445be feat(tui): add custom persona themes with exact brand colors
Create dedicated themes for each persona using their defined colors:
- Zee: #2563EB (blue) - primary, accent, borders
- Stanley: #059669 (green) - primary, success, diff colors
- Johny: #DC2626 (red) - primary, error, diff removed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:33:40 +01:00
Artur Do Lago 3b8d35c021 feat(tui): add agent-specific themes and delegation command
- Add `theme` field to agent schema for per-persona themes
- Auto-switch theme when changing agents
- Configure persona themes: Zee (cobalt2), Stanley (matrix), Johny (rosepine)
- Add "Delegate to persona" command (<leader>d) to prepend @persona to prompt
- Create DialogDelegation component for persona selection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:33:03 +01:00
Artur Do Lago 44ecdde80c feat(tui): add provider auth status indicators to model dialog
Shows ✗ for expired and △ for expiring tokens next to provider names
in favorites, recent, and all providers sections.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:31:57 +01:00
Artur Do Lago d8c52733ec feat(memory): upgrade to Qwen3-Embedding-8B via Nebius API
- Add VoyageEmbeddingProvider for Voyage AI embeddings
- Add MemoryStore with high-level store/search/list API
- Configure Nebius cloud API for Qwen3-Embedding-8B (#1 on MTEB)
- Fix LocalEmbeddingProvider to support both /v1/embeddings and /embeddings
- Fix QdrantVectorStorage to set collection on existing collections

Model: Qwen3-Embedding-8B (70.58 MTEB score, 99% zero-shot, 4096 dims)
Provider: Nebius API (https://api.tokenfactory.nebius.com/v1)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:30:39 +01:00
Artur Do Lago aaee5af01f fix(serve): use SDK-compatible server startup message
Change serve command output from "agent-core server listening" to
"opencode server listening" for compatibility with @opencode-ai/sdk.

The SDK parses stdout looking for "opencode server listening" to
determine when the server is ready.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:30:39 +01:00
Artur Do Lago 86269991b8 docs: add configuration consolidation architecture
Document the shared configuration architecture between agent-core and zee:

- Shared primitives in src/config/shared.ts
- Architecture overview showing ownership patterns
- Key patterns for config, browser, memory, and sessions
- Migration path for zee to import shared types
- Current status and future work

This serves as a reference for the consolidation work and guides
future development on the shared configuration layer.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:30:39 +01:00
Artur Do Lago 2322fdef9f refactor(config): add session entry primitives to shared types
Add additional shared primitives for session management:
- SessionChatType: direct | group | room
- MessagingProvider: whatsapp | telegram | discord | slack | signal | imessage | webchat
- GroupActivation: mention | always
- SendPolicy: allow | deny

These complement the existing SessionScope and enable zee to import
session-related types from agent-core's shared config module.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:30:39 +01:00
Artur Do Lago bb250deb3a refactor(config): extract shared config primitives
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>
2026-01-20 12:30:39 +01:00
Artur Do Lago a9a2b256bf fix(mcp): use bun instead of npx tsx for MCP servers
- 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>
2026-01-20 12:30:39 +01:00
Artur Do Lago afb990b1db feat(mcp): add persona MCP servers for memory, calendar, and portfolio
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>
2026-01-20 12:30:39 +01:00
Artur Do Lago 02de27f7f2 docs(roadmap): update Phase 4 status
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>
2026-01-20 12:30:39 +01:00
Artur Do Lago 35b5d7a311 docs(roadmap): update Phase 3 status - infrastructure mostly complete
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>
2026-01-20 12:30:39 +01:00
Artur Do Lago ed54ff5801 feat(johny): add domain tools and update roadmap
Add Johny learning system domain tools:
- johny:study - Study session management
- johny:knowledge - Knowledge graph operations
- johny:mastery - Mastery level tracking
- johny:review - Spaced repetition reviews
- johny:practice - Practice problem management

Tools bridge to Python CLI via spawnSync for:
- Knowledge graph (topic DAG with prerequisites)
- Mastery tracking (6 levels: Unknown → Fluent)
- Spaced repetition (Ebbinghaus decay)
- FIRe (Fractional Implicit Repetition)

Update roadmap to mark Phase 2.3 Johny as COMPLETE.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:30:39 +01:00
Artur Do Lago ed332849ba feat(auth): add proactive OAuth token refresh
- 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>
2026-01-20 12:30:39 +01:00
Artur Do Lago 91263c6c78 docs: add project roadmap
Covers:
- Phase 1: Foundation (providers, config)
- Phase 2: Personas (Zee, Stanley, Johny features)
- Phase 3: Shared infrastructure (Qdrant, orchestration)
- Phase 4: TUI improvements
- Phase 5: Upstream sync

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:30:39 +01:00
Artur Do Lago a02bfd2c10 fix(config): consolidate providers and agent definitions
- 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>
2026-01-20 12:30:39 +01:00
Artur Do Lago 8571ad3e64 docs: add repo location and run-from-anywhere instructions 2026-01-20 12:30:39 +01:00
Artur Do Lago 8cbec1055a fix(provider): add topP 0.95 for Claude thinking models via Antigravity
- 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>
2026-01-20 12:30:39 +01:00
Artur Do Lago 8acc1f46f2 fix(tui): add favorites support to model selector
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>
2026-01-20 12:27:57 +01:00
Artur Do Lago b145c26d65 fix(provider): remove redundant google-antigravity, keep auth passthrough
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>
2026-01-20 12:27:57 +01:00
Artur Do Lago 9755f3f7ca fix(gateway): fix Telegram message API format and agent routing
- 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>
2026-01-20 12:27:57 +01:00
Artur Do Lago 3d0322904d fix(provider): persist model selection and add google-antigravity provider
- 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>
2026-01-20 12:27:57 +01:00
Artur Do Lago ffd8ad8ab3 feat(gateway): simplify WhatsApp to Zee-only channel
- 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>
2026-01-20 12:27:57 +01:00
Artur Do Lago 827356d06f fix(gateway): save WhatsApp QR code as PNG file for reliable scanning
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>
2026-01-20 12:27:24 +01:00