refactor: update remaining modules to use plugin-identity constants

Update various modules to use centralized constants from plugin-identity:
- get-local-version/formatter: Use PUBLISHED_PACKAGE_NAME
- run/session-resolver: Use PUBLISHED_PACKAGE_NAME
- background-agent/task-poller: Use PUBLISHED_PACKAGE_NAME
- mcp-oauth/provider: Use PUBLISHED_PACKAGE_NAME
- auto-update-checker/constants: Use ACCEPTED_PACKAGE_NAMES
- comment-checker/downloader: Use PUBLISHED_PACKAGE_NAME
- legacy-plugin-toast/hook: Use PLUGIN_NAME
- shared/data-path: Use CACHE_DIR_NAME
- shared/external-plugin-detector: Use ACCEPTED_PACKAGE_NAMES
- shared/logger: Use LOG_FILENAME
- tools/ast-grep/downloader: Use PUBLISHED_PACKAGE_NAME
- tools/call-omo-agent/tools: Use PUBLISHED_PACKAGE_NAME
- tools/delegate-task/category-resolver: Use PUBLISHED_PACKAGE_NAME
- tools/grep/constants: Use PUBLISHED_PACKAGE_NAME
- tools/grep/downloader: Use PUBLISHED_PACKAGE_NAME
- tools/lsp/lsp-client-wrapper: Use PUBLISHED_PACKAGE_NAME

🤖 Generated with assistance of OhMyOpenCode
This commit is contained in:
YeonGyu-Kim
2026-04-10 11:16:16 +09:00
parent 41b9b4d724
commit 33ac57ba7a
16 changed files with 61 additions and 41 deletions
+3 -2
View File
@@ -4,6 +4,7 @@ import { spawnSync } from "node:child_process"
import { getInstalledRipgrepPath, downloadAndInstallRipgrep } from "./downloader"
import { getDataDir } from "../../shared/data-path"
import { log } from "../../shared/logger"
import { PUBLISHED_PACKAGE_NAME } from "../../shared/plugin-identity"
export type GrepBackend = "rg" | "grep"
@@ -106,12 +107,12 @@ export async function resolveGrepCliWithAutoInstall(): Promise<ResolvedCli> {
return cachedCli
} catch (error) {
if (current.backend === "grep") {
log("[oh-my-opencode] Failed to auto-install ripgrep. Falling back to GNU grep.", {
log(`[${PUBLISHED_PACKAGE_NAME}] Failed to auto-install ripgrep. Falling back to GNU grep.`, {
error: error instanceof Error ? error.message : String(error),
grep_path: current.path,
})
} else {
log("[oh-my-opencode] Failed to auto-install ripgrep and GNU grep was not found.", {
log(`[${PUBLISHED_PACKAGE_NAME}] Failed to auto-install ripgrep and GNU grep was not found.`, {
error: error instanceof Error ? error.message : String(error),
})
}
+2 -1
View File
@@ -1,6 +1,7 @@
import { existsSync, readdirSync } from "node:fs"
import { join } from "node:path"
import { extractZip as extractZipBase } from "../../shared"
import { CACHE_DIR_NAME } from "../../shared/plugin-identity"
import {
cleanupArchive,
downloadArchive,
@@ -39,7 +40,7 @@ function getPlatformKey(): string {
function getInstallDir(): string {
const homeDir = process.env.HOME || process.env.USERPROFILE || "."
return join(homeDir, ".cache", "oh-my-opencode", "bin")
return join(homeDir, ".cache", CACHE_DIR_NAME, "bin")
}
function getRgPath(): string {