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>
This commit is contained in:
Artur Do Lago
2026-01-11 12:42:26 +01:00
parent 924a46ed07
commit 1210cd83e6
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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"),
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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';
+1 -1
View File
@@ -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