From 1210cd83e6c005f7ff343649d7c6d856c2bbffaa Mon Sep 17 00:00:00 2001 From: Artur Do Lago Date: Sun, 11 Jan 2026 12:42:26 +0100 Subject: [PATCH] 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 --- packages/agent-core/src/auth/index.ts | 2 +- packages/agent-core/src/global/index.ts | 4 ++-- src/index.ts | 2 +- src/surface/cli.ts | 2 +- src/wezterm/workspace.lua | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/agent-core/src/auth/index.ts b/packages/agent-core/src/auth/index.ts index b7e21d5d4f8..ccad5cedb61 100644 --- a/packages/agent-core/src/auth/index.ts +++ b/packages/agent-core/src/auth/index.ts @@ -4,7 +4,7 @@ import fs from "fs/promises" import z from "zod" import { Log } from "../util/log" -export const OAUTH_DUMMY_KEY = "opencode-oauth-dummy-key" +export const OAUTH_DUMMY_KEY = "agent-core-oauth-dummy-key" // Buffer time before expiry to trigger refresh (10 minutes) const REFRESH_BUFFER_MS = 10 * 60 * 1000 diff --git a/packages/agent-core/src/global/index.ts b/packages/agent-core/src/global/index.ts index ba4e8638eb3..975bd9f1794 100644 --- a/packages/agent-core/src/global/index.ts +++ b/packages/agent-core/src/global/index.ts @@ -12,9 +12,9 @@ const state = path.join(xdgState!, app) export namespace Global { export const Path = { - // Allow override via OPENCODE_TEST_HOME for test isolation + // Allow override for test isolation (AGENT_CORE_TEST_HOME preferred, OPENCODE_TEST_HOME for compat) get home() { - return process.env.OPENCODE_TEST_HOME || os.homedir() + return process.env.AGENT_CORE_TEST_HOME || process.env.OPENCODE_TEST_HOME || os.homedir() }, data, bin: path.join(data, "bin"), diff --git a/src/index.ts b/src/index.ts index 5477076f664..3faebc96b0b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,7 @@ /** * Agent Core - Unified AI Agent Foundation * - * Powers Stanley (GUI/GPUI), Zee (WhatsApp/Telegram), and OpenCode (CLI/TUI) + * Powers Stanley (GUI/GPUI), Zee (WhatsApp/Telegram), and agent-core (CLI/TUI) * with subscription-based auth support (Claude Max, ChatGPT Plus, GitHub Copilot). * * ## Architecture Overview diff --git a/src/surface/cli.ts b/src/surface/cli.ts index 934390533a4..fe1e541c413 100644 --- a/src/surface/cli.ts +++ b/src/surface/cli.ts @@ -2,7 +2,7 @@ * CLI/TUI Surface Adapter * * Terminal-based interaction with streaming text output and interactive permission prompts. - * Designed for OpenCode and similar terminal-based agent interfaces. + * Designed for agent-core and similar terminal-based agent interfaces. */ import { createInterface, type Interface as ReadlineInterface } from 'node:readline'; diff --git a/src/wezterm/workspace.lua b/src/wezterm/workspace.lua index ef4d9532b28..8a5864cb206 100644 --- a/src/wezterm/workspace.lua +++ b/src/wezterm/workspace.lua @@ -32,7 +32,7 @@ function M.spawn_drone_pane(window, persona) cwd = M.config.agent_core_path, }) - drone_pane:send_text(string.format("opencode --agent %s\n", persona)) + drone_pane:send_text(string.format("agent-core --agent %s\n", persona)) return drone_pane end