v0.5.0: Binary-Free Mode - No OpenCode binary required
✨ Major Features: - Native session management without OpenCode binary - Provider routing: OpenCode Zen (free), Qwen OAuth, Z.AI - Streaming chat with tool execution loop - Mode detection API (/api/meta/mode) - MCP integration fix (resolved infinite loading) - NomadArch Native option in UI with comparison info 🆓 Free Models (No API Key): - GPT-5 Nano (400K context) - Grok Code Fast 1 (256K context) - GLM-4.7 (205K context) - Doubao Seed Code (256K context) - Big Pickle (200K context) 📦 New Files: - session-store.ts: Native session persistence - native-sessions.ts: REST API for sessions - lite-mode.ts: UI mode detection client - native-sessions.ts (UI): SolidJS store 🔧 Updated: - All installers: Optional binary download - All launchers: Mode detection display - Binary selector: Added NomadArch Native option - README: Binary-Free Mode documentation
This commit is contained in:
@@ -18,7 +18,7 @@ import type { MessageStatus } from "./message-v2/types"
|
||||
import { getLogger } from "../lib/logger"
|
||||
import { showToastNotification, ToastVariant } from "../lib/notifications"
|
||||
import { instances, addPermissionToQueue, removePermissionFromQueue, sendPermissionResponse } from "./instances"
|
||||
import { getSoloState, incrementStep, popFromTaskQueue, setActiveTaskId } from "./solo-store"
|
||||
import { getSoloState, incrementStep, popFromTaskQueue, setActiveTaskId, canPerformAutonomousAction, recordAutonomousAction, resetErrorRecovery, clearContinuationFlag } from "./solo-store"
|
||||
import { sendMessage, consumeTokenWarningSuppression, consumeCompactionSuppression, updateSessionModel } from "./session-actions"
|
||||
import { showAlertDialog } from "./alerts"
|
||||
import { sessions, setSessions, withSession } from "./session-state"
|
||||
@@ -175,11 +175,21 @@ function handleMessageUpdate(instanceId: string, event: MessageUpdateEvent | Mes
|
||||
// Auto-correction logic for SOLO
|
||||
const solo = getSoloState(instanceId)
|
||||
if (hasError && solo.isAutonomous && solo.currentStep < solo.maxSteps) {
|
||||
log.info(`[SOLO] Error detected in autonomous mode, prompting for fix: ${messageId}`)
|
||||
const errorMessage = (info as any).error?.message || "Unknown error"
|
||||
|
||||
// Check if we can perform autonomous error recovery (loop prevention)
|
||||
if (!canPerformAutonomousAction(instanceId, "error_recovery")) {
|
||||
log.warn("[SOLO] Error recovery blocked by loop prevention", { instanceId, sessionId, errorMessage })
|
||||
return
|
||||
}
|
||||
|
||||
log.info(`[SOLO] Error detected in autonomous mode, prompting for fix: ${messageId}`)
|
||||
incrementStep(instanceId)
|
||||
recordAutonomousAction(instanceId, "error_recovery", errorMessage)
|
||||
|
||||
sendMessage(instanceId, sessionId, `The previous step failed with error: ${errorMessage}. Please analyze the error and try a different approach.`, [], solo.activeTaskId || undefined).catch((err) => {
|
||||
log.error("[SOLO] Failed to send error correction message", err)
|
||||
resetErrorRecovery(instanceId)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -338,10 +348,17 @@ function handleSessionIdle(instanceId: string, event: EventSessionIdle): void {
|
||||
const session = instanceSessions?.get(sessionId)
|
||||
if (!session) return
|
||||
|
||||
// If there's an active task, we might want to prompt the agent to continue or check progress
|
||||
// If there's an active task, we might want to prompt to agent to continue or check progress
|
||||
if (!canPerformAutonomousAction(instanceId, "idle_continuation")) {
|
||||
log.warn("[SOLO] Idle continuation blocked by loop prevention", { instanceId, sessionId })
|
||||
clearContinuationFlag(instanceId)
|
||||
return
|
||||
}
|
||||
|
||||
if (solo.activeTaskId) {
|
||||
log.info(`[SOLO] Session idle in autonomous mode, prompting continuation for task: ${solo.activeTaskId}`)
|
||||
incrementStep(instanceId)
|
||||
recordAutonomousAction(instanceId, "idle_continuation")
|
||||
sendMessage(instanceId, sessionId, "Continue", [], solo.activeTaskId).catch((err) => {
|
||||
log.error("[SOLO] Failed to send continuation message", err)
|
||||
})
|
||||
@@ -363,6 +380,7 @@ function handleSessionIdle(instanceId: string, event: EventSessionIdle): void {
|
||||
}
|
||||
|
||||
setActiveTaskId(instanceId, nextTaskId)
|
||||
recordAutonomousAction(instanceId, "idle_continuation")
|
||||
sendMessage(instanceId, sessionId, taskTitle, [], nextTaskId).catch((err) => {
|
||||
log.error("[SOLO] Failed to start next task", err)
|
||||
})
|
||||
@@ -435,10 +453,19 @@ function handleSessionError(instanceId: string, event: EventSessionError): void
|
||||
const sessionId = (event.properties as any)?.sessionID
|
||||
|
||||
if (solo.isAutonomous && sessionId && solo.currentStep < solo.maxSteps) {
|
||||
const errorMessage = `I encountered an error: "${message}". Please analyze the cause and provide a fix.`
|
||||
|
||||
if (!canPerformAutonomousAction(instanceId, "error_recovery")) {
|
||||
log.warn("[SOLO] Error recovery blocked by loop prevention", { instanceId, sessionId, message })
|
||||
return
|
||||
}
|
||||
|
||||
log.info(`[SOLO] Session error in autonomous mode, prompting fix: ${message}`)
|
||||
incrementStep(instanceId)
|
||||
sendMessage(instanceId, sessionId, `I encountered an error: "${message}". Please analyze the cause and provide a fix.`, [], solo.activeTaskId || undefined).catch((err) => {
|
||||
recordAutonomousAction(instanceId, "error_recovery", message)
|
||||
sendMessage(instanceId, sessionId, errorMessage, [], solo.activeTaskId || undefined).catch((err) => {
|
||||
log.error("[SOLO] Failed to send error recovery message", err)
|
||||
resetErrorRecovery(instanceId)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user