Added new models for Claude Opus 4.8 and GPT 5.4 Mini.

Disabled Cowork
This commit is contained in:
decolua
2026-05-29 17:36:27 +07:00
parent 88224b80ca
commit 468c61b2ac
9 changed files with 60 additions and 94 deletions
+9 -8
View File
@@ -117,14 +117,15 @@ export const CLI_TOOLS = {
description: "OpenCode AI Terminal Assistant",
configType: "custom",
},
cowork: {
id: "cowork",
name: "Claude Cowork",
image: "/providers/claude.png",
color: "#D97757",
description: "Claude Desktop Cowork (third-party inference)",
configType: "custom",
},
// Cowork disabled: spawns arbitrary processes (RCE risk). Hidden from CLI tools UI.
// cowork: {
// id: "cowork",
// name: "Claude Cowork",
// image: "/providers/claude.png",
// color: "#D97757",
// description: "Claude Desktop Cowork (third-party inference)",
// configType: "custom",
// },
hermes: {
id: "hermes",
name: "Hermes Agent",
+12 -15
View File
@@ -142,9 +142,14 @@ async function safeRestartTunnel(reason) {
if (svc.cancelToken.cancelled) return;
if (svc.spawnInProgress) return;
// Alive check FIRST: probe URLs to decide health (process up but tunnel 530 = dead)
let alive = false;
if (isCloudflaredRunning()) {
const force = FORCE_RESTART_REASONS.test(reason);
// Watchdog: process alive = trust it (cloudflared self-retries via --retries 99).
// Avoids killing a healthy tunnel on transient HTTP probe failures (app busy / slow DNS).
if (!force && isCloudflaredRunning()) return;
// Force reasons (netchange/sleep/online): process may be up but routing stale → probe to confirm
if (force && isCloudflaredRunning()) {
const state = loadState();
const publicUrl = state?.shortId ? `https://r${state.shortId}.abc-tunnel.us` : null;
const directUrl = state?.tunnelUrl || null;
@@ -153,14 +158,10 @@ async function safeRestartTunnel(reason) {
probeCloudflareAlive(publicUrl),
probeCloudflareAlive(directUrl),
]);
alive = publicOk && directOk;
if (publicOk && directOk) return;
}
}
if (alive) return;
// Degraded/dead → cooldown only prevents hammer loop after a recent restart attempt.
// Bypass for network transitions (one-shot events) so user recovers fast after wifi change.
const force = FORCE_RESTART_REASONS.test(reason);
if (!force && Date.now() - svc.lastRestartAt < RESTART_COOLDOWN_MS) {
console.log(`[Tunnel] degraded but cooldown active, skip (${reason})`);
return;
@@ -184,12 +185,8 @@ async function safeRestartTailscale(reason) {
if (svc.cancelToken.cancelled) return;
if (svc.spawnInProgress) return;
// Alive check FIRST: daemon up + URL responds = healthy
let alive = false;
if (isTailscaleRunning() && settings.tailscaleUrl) {
alive = await probeTailscaleAlive(settings.tailscaleUrl);
}
if (alive) return;
// Tailscale daemon is OS-level with built-in reconnect; trust it when running
if (isTailscaleRunning()) return;
const force = FORCE_RESTART_REASONS.test(reason);
if (!force && Date.now() - svc.lastRestartAt < RESTART_COOLDOWN_MS) {
@@ -198,7 +195,7 @@ async function safeRestartTailscale(reason) {
}
if (!await checkInternet()) return;
console.log(`[Tailscale] safeRestart (${reason}) — tunnel unreachable${force ? " [force]" : ""}`);
console.log(`[Tailscale] safeRestart (${reason}) — daemon not running${force ? " [force]" : ""}`);
try {
await enableTailscale();
svc.lastRestartAt = Date.now();