feat(conatus): Implement Persistent Lab Sessions#9893
feat(conatus): Implement Persistent Lab Sessions#9893bryanbalmer wants to merge 15 commits intoanomalyco:devfrom
Conversation
Port orchestration capabilities from Claude Code integration: - Ralph Loop: Continuous execution until <promise>DONE</promise> marker - Background Agents: Spawn oracle/librarian/explore/research/analyze/implement - Complexity Detection: Auto-detect task complexity with word boundaries - Model Aliases: 20+ aliases covering Anthropic, OpenAI, DeepSeek, Google, Groq, Mistral Add Bryan dialectic integration for human-in-loop workflows: - Question/answer management via .bryan/ directory - Continuation processing for answered questions - Group-based routing (philosophical-union, groundwork-guild, integration-assembly) - Type-safe events using Zod schemas Key features: - Uses OpenCode's Storage API with built-in locking - Proper typed events via BusEvent.define() - Integrates with Instance context and Event Bus Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Named after Spinoza's concept of striving to persist in one's being, conatus embodies persistent, joyful work through orchestration and human-AI dialectic integration. Changes: - Renamed package from opencode to conatus - Created new bin/conatus launcher with backward compatibility - Updated global/index.ts to support both conatus and opencode directories - Added CONATUS.md with installation and usage instructions The CLI now runs as `conatus` while maintaining full backward compatibility with existing opencode configurations, environment variables, and directories. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Mined commit history and found removed auth/anthropic.ts that provides Claude OAuth via claude.ai - the SAME authentication flow Claude Code uses. Changes: - Restored src/auth/anthropic.ts with dual-mode OAuth (claude.ai + console) - Updated provider.ts to use OAuth when credentials available - Added yaml dependency for dialectic module - Fixed workspace reference (opencode → conatus in packages/web) - Added HEADLESS-CONNECTION.md with remote access instructions Now conatus uses IDENTICAL authentication to Claude Code: - Same OAuth client_id: 9d1c250a-e61b-44d9-88ed-5944d1962f5e - Same token endpoint: console.anthropic.com/v1/oauth/token - Same scopes: org:create_api_key user:profile user:inference - Same billing: Your Claude subscription THRUST//VECTOR: NO BRAKES. Auth parity achieved. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add opencode-anthropic-auth plugin to config for Claude Code auth parity - Remove conflicting custom anthropic loader from provider.ts (plugin handles it) - Add conatus-dev script for system-wide development installation - Keep auth/anthropic.ts for reference (credentials bridging code) The opencode-anthropic-auth plugin handles: - System prompt sanitization (OpenCode → Claude Code) - Tool name prefixing with mcp_ - Beta header management including claude-code-20250219 - Stream response transformation Tested and working with anthropic/claude-opus-4-5-20251101 using Claude Code subscription OAuth credentials. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The launcher now injects -m anthropic/claude-opus-4-5-20251101 when no model is explicitly specified. This works around a hang in the default model resolution path (possibly due to sleeping RunPod pod). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add DialogLabList component for Ctrl+L lab switching - Support the four canonical labs: Bootstrap, Study, Teach, Govern - Each lab has persistent sessions - switch to existing or create new - Add lab_list keybind (Ctrl+L) in config - Register lab.list command in app.tsx Active Agents improvements: - Add spinner animations for working/retrying agents - Hover highlight on agent rows for better click targets - Click to switch sessions works perfectly - Display lab badge in sidebar header when in a lab session - Collapsible agents list when >2 agents
Show lab emoji icon in header when session belongs to a lab, providing visual indicator even when sidebar is hidden
Educate users about Ctrl+L shortcut for switching between labs
Shows Labs indicator with Ctrl+L keybind for quick discovery
- Show lab icons in session list next to timestamps - Display current lab name and icon in session footer - Add Labs shortcut hint in session footer - Show toast notifications when switching labs or creating new lab sessions - Color-code spinners based on lab theme color
- Use shared LABS definition from dialog-lab-list across header and sidebar - Apply lab-specific theme colors (warning, primary, success, accent) to badges - Remove duplicate lab detection logic - Consistent lab detection using id and name matching
- Show active lab sessions in /status dialog with working indicators - Display animated spinners for labs with busy status - Show current lab in 'Switch lab' command title when in a lab session - Add working session count to status overview
…er instead of JSX
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found several potentially related PRs that address session persistence and similar features:
Most relevant duplicates: PRs #5153 and #6563 appear to be the closest to your current PR #9893, as they specifically address session persistence. You may want to review these to ensure your implementation doesn't duplicate existing work or conflicts with prior approaches. |
595af12 to
74273be
Compare
00637c0 to
71e0ba2
Compare
f1ae801 to
08fa7f7
Compare
Summary
Gestaltist/Haptic Assembly implementation of session persistence.
.opencode-sessionin current directory on startup..opencode-sessionwhen creating/switching labs via UI.Verification