fix(release): revert package identity to oh-my-opencode

Keep installer, config detection, schema generation, and publish workflows aligned with the long-lived oh-my-opencode package so this release does not split across two npm names.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-03-14 13:52:57 +09:00
parent 612b9c163d
commit f31f50abec
11 changed files with 32 additions and 4160 deletions

View File

@@ -197,11 +197,6 @@ jobs:
retention-days: 1
if-no-files-found: error
# =============================================================================
# Job 2: Publish all platforms (oh-my-opencode + oh-my-openagent)
# - Runs on ubuntu-latest for ALL platforms (just downloading artifacts)
# - Uses NODE_AUTH_TOKEN for auth + OIDC for provenance attestation
# =============================================================================
publish:
needs: build
if: always() && !cancelled()
@@ -226,23 +221,9 @@ jobs:
echo "→ ${PKG_NAME}@${VERSION} will be published"
fi
- name: Check if oh-my-openagent already published
id: check-openagent
run: |
PKG_NAME="oh-my-openagent-${{ matrix.platform }}"
VERSION="${{ inputs.version }}"
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://registry.npmjs.org/${PKG_NAME}/${VERSION}")
if [ "$STATUS" = "200" ]; then
echo "skip=true" >> $GITHUB_OUTPUT
echo "✓ ${PKG_NAME}@${VERSION} already published, skipping"
else
echo "skip=false" >> $GITHUB_OUTPUT
echo "→ ${PKG_NAME}@${VERSION} will be published"
fi
- name: Download artifact
id: download
if: steps.check.outputs.skip != 'true' || steps.check-openagent.outputs.skip != 'true'
if: steps.check.outputs.skip != 'true'
continue-on-error: true
uses: actions/download-artifact@v4
with:
@@ -250,7 +231,7 @@ jobs:
path: .
- name: Extract artifact
if: (steps.check.outputs.skip != 'true' || steps.check-openagent.outputs.skip != 'true') && steps.download.outcome == 'success'
if: steps.check.outputs.skip != 'true' && steps.download.outcome == 'success'
run: |
PLATFORM="${{ matrix.platform }}"
mkdir -p packages/${PLATFORM}
@@ -266,7 +247,7 @@ jobs:
ls -la packages/${PLATFORM}/bin/
- uses: actions/setup-node@v4
if: (steps.check.outputs.skip != 'true' || steps.check-openagent.outputs.skip != 'true') && steps.download.outcome == 'success'
if: steps.check.outputs.skip != 'true' && steps.download.outcome == 'success'
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
@@ -286,25 +267,3 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NPM_CONFIG_PROVENANCE: true
timeout-minutes: 15
- name: Publish oh-my-openagent-${{ matrix.platform }}
if: steps.check-openagent.outputs.skip != 'true' && steps.download.outcome == 'success'
run: |
cd packages/${{ matrix.platform }}
# Rename package for oh-my-openagent
jq --arg name "oh-my-openagent-${{ matrix.platform }}" \
--arg desc "Platform-specific binary for oh-my-openagent (${{ matrix.platform }})" \
'.name = $name | .description = $desc | .bin = {"oh-my-openagent": (.bin | to_entries | .[0].value)}' \
package.json > tmp.json && mv tmp.json package.json
TAG_ARG=""
if [ -n "${{ inputs.dist_tag }}" ]; then
TAG_ARG="--tag ${{ inputs.dist_tag }}"
fi
npm publish --access public --provenance $TAG_ARG
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NPM_CONFIG_PROVENANCE: true
timeout-minutes: 15

View File

@@ -215,40 +215,6 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NPM_CONFIG_PROVENANCE: true
- name: Publish oh-my-openagent
if: steps.check.outputs.skip != 'true'
run: |
# Update package name to oh-my-openagent
jq '.name = "oh-my-openagent"' package.json > tmp.json && mv tmp.json package.json
# Update optionalDependencies to use oh-my-openagent naming
jq '.optionalDependencies = {
"oh-my-openagent-darwin-arm64": "${{ steps.version.outputs.version }}",
"oh-my-openagent-darwin-x64": "${{ steps.version.outputs.version }}",
"oh-my-openagent-darwin-x64-baseline": "${{ steps.version.outputs.version }}",
"oh-my-openagent-linux-arm64": "${{ steps.version.outputs.version }}",
"oh-my-openagent-linux-arm64-musl": "${{ steps.version.outputs.version }}",
"oh-my-openagent-linux-x64": "${{ steps.version.outputs.version }}",
"oh-my-openagent-linux-x64-baseline": "${{ steps.version.outputs.version }}",
"oh-my-openagent-linux-x64-musl": "${{ steps.version.outputs.version }}",
"oh-my-openagent-linux-x64-musl-baseline": "${{ steps.version.outputs.version }}",
"oh-my-openagent-windows-x64": "${{ steps.version.outputs.version }}",
"oh-my-openagent-windows-x64-baseline": "${{ steps.version.outputs.version }}"
}' package.json > tmp.json && mv tmp.json package.json
TAG_ARG=""
if [ -n "${{ steps.version.outputs.dist_tag }}" ]; then
TAG_ARG="--tag ${{ steps.version.outputs.dist_tag }}"
fi
npm publish --access public --provenance $TAG_ARG || echo "oh-my-openagent publish may have failed (package may already exist)"
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NPM_CONFIG_PROVENANCE: true
- name: Restore package.json
if: steps.check.outputs.skip != 'true'
run: |
# Restore original package name
jq '.name = "oh-my-opencode"' package.json > tmp.json && mv tmp.json package.json
trigger-platform:
runs-on: ubuntu-latest

View File

@@ -37,7 +37,7 @@
<div align="center">
[![GitHub Release](https://img.shields.io/github/v/release/code-yeongyu/oh-my-openagent?color=369eff&labelColor=black&logo=github&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/releases)
[![npm downloads](https://img.shields.io/endpoint?url=https%3A%2F%2Fohmyopenagent.com%2Fapi%2Fnpm-downloads&style=flat-square)](https://www.npmjs.com/package/oh-my-openagent)
[![npm downloads](https://img.shields.io/endpoint?url=https%3A%2F%2Fohmyopenagent.com%2Fapi%2Fnpm-downloads&style=flat-square)](https://www.npmjs.com/package/oh-my-opencode)
[![GitHub Contributors](https://img.shields.io/github/contributors/code-yeongyu/oh-my-openagent?color=c4f042&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/graphs/contributors)
[![GitHub Forks](https://img.shields.io/github/forks/code-yeongyu/oh-my-openagent?color=8ae8ff&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/network/members)
[![GitHub Stars](https://img.shields.io/github/stars/code-yeongyu/oh-my-openagent?color=ffcb47&labelColor=black&style=flat-square)](https://github.com/code-yeongyu/oh-my-openagent/stargazers)

File diff suppressed because it is too large Load Diff

View File

@@ -3,30 +3,15 @@ import { createOhMyOpenCodeJsonSchema } from "./build-schema-document"
const SCHEMA_OUTPUT_PATH = "assets/oh-my-opencode.schema.json"
const DIST_SCHEMA_OUTPUT_PATH = "dist/oh-my-opencode.schema.json"
const OPENAGENT_SCHEMA_OUTPUT_PATH = "assets/oh-my-openagent.schema.json"
const OPENAGENT_DIST_SCHEMA_OUTPUT_PATH = "dist/oh-my-openagent.schema.json"
async function main() {
console.log("Generating JSON Schema...")
const finalSchema = createOhMyOpenCodeJsonSchema()
// oh-my-opencode schema (backward compatibility)
await Bun.write(SCHEMA_OUTPUT_PATH, JSON.stringify(finalSchema, null, 2))
await Bun.write(DIST_SCHEMA_OUTPUT_PATH, JSON.stringify(finalSchema, null, 2))
// oh-my-openagent schema (new name)
const openAgentSchema = {
...finalSchema,
$id: "https://raw.githubusercontent.com/code-yeongyu/oh-my-openagent/dev/assets/oh-my-openagent.schema.json",
title: "Oh My OpenAgent Configuration",
description: "Configuration schema for oh-my-openagent plugin",
}
await Bun.write(OPENAGENT_SCHEMA_OUTPUT_PATH, JSON.stringify(openAgentSchema, null, 2))
await Bun.write(OPENAGENT_DIST_SCHEMA_OUTPUT_PATH, JSON.stringify(openAgentSchema, null, 2))
console.log(`✓ JSON Schema generated: ${SCHEMA_OUTPUT_PATH}`)
console.log(`✓ JSON Schema generated: ${OPENAGENT_SCHEMA_OUTPUT_PATH}`)
}
main()

View File

@@ -7,8 +7,7 @@ import { detectConfigFormat } from "./opencode-config-format"
import { parseOpenCodeConfigFileWithError, type OpenCodeConfig } from "./parse-opencode-config-file"
import { getPluginNameWithVersion } from "./plugin-name-with-version"
const OLD_PACKAGE_NAME = "oh-my-opencode"
const NEW_PACKAGE_NAME = "oh-my-openagent"
const PACKAGE_NAME = "oh-my-opencode"
export async function addPluginToOpenCodeConfig(currentVersion: string): Promise<ConfigMergeResult> {
try {
@@ -22,7 +21,7 @@ export async function addPluginToOpenCodeConfig(currentVersion: string): Promise
}
const { format, path } = detectConfigFormat()
const pluginEntry = await getPluginNameWithVersion(currentVersion, NEW_PACKAGE_NAME)
const pluginEntry = await getPluginNameWithVersion(currentVersion, PACKAGE_NAME)
try {
if (format === "none") {
@@ -42,13 +41,7 @@ export async function addPluginToOpenCodeConfig(currentVersion: string): Promise
const config = parseResult.config
const plugins = config.plugin ?? []
const existingIndex = plugins.findIndex(
(p) =>
p === OLD_PACKAGE_NAME ||
p.startsWith(`${OLD_PACKAGE_NAME}@`) ||
p === NEW_PACKAGE_NAME ||
p.startsWith(`${NEW_PACKAGE_NAME}@`)
)
const existingIndex = plugins.findIndex((plugin) => plugin === PACKAGE_NAME || plugin.startsWith(`${PACKAGE_NAME}@`))
if (existingIndex !== -1) {
if (plugins[existingIndex] === pluginEntry) {

View File

@@ -56,6 +56,7 @@ function detectProvidersFromOmoConfig(): {
}
export function detectCurrentConfig(): DetectedConfig {
const PACKAGE_NAME = "oh-my-opencode"
const result: DetectedConfig = {
isInstalled: false,
hasClaude: true,
@@ -65,7 +66,7 @@ export function detectCurrentConfig(): DetectedConfig {
hasCopilot: false,
hasOpencodeZen: true,
hasZaiCodingPlan: false,
hasKimiForCoding: false,
hasKimiForCoding: false,
hasOpencodeGo: false,
}
@@ -81,9 +82,7 @@ hasKimiForCoding: false,
const openCodeConfig = parseResult.config
const plugins = openCodeConfig.plugin ?? []
const OLD_PACKAGE_NAME = "oh-my-opencode"
const NEW_PACKAGE_NAME = "oh-my-openagent"
result.isInstalled = plugins.some((p) => p.startsWith(OLD_PACKAGE_NAME) || p.startsWith(NEW_PACKAGE_NAME))
result.isInstalled = plugins.some((plugin) => plugin.startsWith(PACKAGE_NAME))
if (!result.isInstalled) {
return result

View File

@@ -7,7 +7,7 @@ import { resetConfigContext } from "./config-context"
import { detectCurrentConfig } from "./detect-current-config"
import { addPluginToOpenCodeConfig } from "./add-plugin-to-opencode-config"
describe("detectCurrentConfig - dual name detection", () => {
describe("detectCurrentConfig - single package detection", () => {
let testConfigDir = ""
let testConfigPath = ""
let testOmoConfigPath = ""
@@ -40,18 +40,6 @@ describe("detectCurrentConfig - dual name detection", () => {
expect(result.isInstalled).toBe(true)
})
it("detects oh-my-openagent in plugin array", () => {
// given
const config = { plugin: ["oh-my-openagent"] }
writeFileSync(testConfigPath, JSON.stringify(config, null, 2) + "\n", "utf-8")
// when
const result = detectCurrentConfig()
// then
expect(result.isInstalled).toBe(true)
})
it("detects oh-my-opencode with version pin", () => {
// given
const config = { plugin: ["oh-my-opencode@3.11.0"] }
@@ -64,18 +52,6 @@ describe("detectCurrentConfig - dual name detection", () => {
expect(result.isInstalled).toBe(true)
})
it("detects oh-my-openagent with version pin", () => {
// given
const config = { plugin: ["oh-my-openagent@3.12.0"] }
writeFileSync(testConfigPath, JSON.stringify(config, null, 2) + "\n", "utf-8")
// when
const result = detectCurrentConfig()
// then
expect(result.isInstalled).toBe(true)
})
it("returns false when plugin not present", () => {
// given
const config = { plugin: ["some-other-plugin"] }
@@ -90,7 +66,7 @@ describe("detectCurrentConfig - dual name detection", () => {
it("detects OpenCode Go from the existing omo config", () => {
// given
writeFileSync(testConfigPath, JSON.stringify({ plugin: ["oh-my-openagent"] }, null, 2) + "\n", "utf-8")
writeFileSync(testConfigPath, JSON.stringify({ plugin: ["oh-my-opencode"] }, null, 2) + "\n", "utf-8")
writeFileSync(
testOmoConfigPath,
JSON.stringify({ agents: { atlas: { model: "opencode-go/kimi-k2.5" } } }, null, 2) + "\n",
@@ -106,7 +82,7 @@ describe("detectCurrentConfig - dual name detection", () => {
})
})
describe("addPluginToOpenCodeConfig - dual name detection", () => {
describe("addPluginToOpenCodeConfig - single package writes", () => {
let testConfigDir = ""
let testConfigPath = ""
@@ -125,7 +101,7 @@ describe("addPluginToOpenCodeConfig - dual name detection", () => {
delete process.env.OPENCODE_CONFIG_DIR
})
it("finds and replaces old oh-my-opencode with new name", async () => {
it("keeps oh-my-opencode when it already exists", async () => {
// given
const config = { plugin: ["oh-my-opencode"] }
writeFileSync(testConfigPath, JSON.stringify(config, null, 2) + "\n", "utf-8")
@@ -136,26 +112,10 @@ describe("addPluginToOpenCodeConfig - dual name detection", () => {
// then
expect(result.success).toBe(true)
const savedConfig = JSON.parse(readFileSync(testConfigPath, "utf-8"))
expect(savedConfig.plugin).toContain("oh-my-openagent")
expect(savedConfig.plugin).not.toContain("oh-my-opencode")
expect(savedConfig.plugin).toContain("oh-my-opencode")
})
it("finds and replaces oh-my-openagent with new name", async () => {
// given
const config = { plugin: ["oh-my-openagent"] }
writeFileSync(testConfigPath, JSON.stringify(config, null, 2) + "\n", "utf-8")
// when
const result = await addPluginToOpenCodeConfig("3.11.0")
// then
expect(result.success).toBe(true)
const savedConfig = JSON.parse(readFileSync(testConfigPath, "utf-8"))
expect(savedConfig.plugin).toContain("oh-my-openagent")
expect(savedConfig.plugin).not.toContain("oh-my-opencode")
})
it("finds and replaces version-pinned oh-my-opencode@X.Y.Z", async () => {
it("replaces version-pinned oh-my-opencode@X.Y.Z", async () => {
// given
const config = { plugin: ["oh-my-opencode@3.10.0"] }
writeFileSync(testConfigPath, JSON.stringify(config, null, 2) + "\n", "utf-8")
@@ -166,27 +126,12 @@ describe("addPluginToOpenCodeConfig - dual name detection", () => {
// then
expect(result.success).toBe(true)
const savedConfig = JSON.parse(readFileSync(testConfigPath, "utf-8"))
expect(savedConfig.plugin).toContain("oh-my-openagent")
expect(savedConfig.plugin).toContain("oh-my-opencode")
expect(savedConfig.plugin).not.toContain("oh-my-opencode@3.10.0")
})
it("finds and replaces version-pinned oh-my-openagent@X.Y.Z", async () => {
// given
const config = { plugin: ["oh-my-openagent@3.10.0"] }
writeFileSync(testConfigPath, JSON.stringify(config, null, 2) + "\n", "utf-8")
// when
const result = await addPluginToOpenCodeConfig("3.11.0")
// then
expect(result.success).toBe(true)
const savedConfig = JSON.parse(readFileSync(testConfigPath, "utf-8"))
expect(savedConfig.plugin).toContain("oh-my-openagent")
expect(savedConfig.plugin).not.toContain("oh-my-openagent@3.10.0")
})
it("adds new plugin when none exists", async () => {
// given - no plugin array
// given
const config = {}
writeFileSync(testConfigPath, JSON.stringify(config, null, 2) + "\n", "utf-8")
@@ -196,11 +141,11 @@ describe("addPluginToOpenCodeConfig - dual name detection", () => {
// then
expect(result.success).toBe(true)
const savedConfig = JSON.parse(readFileSync(testConfigPath, "utf-8"))
expect(savedConfig.plugin).toContain("oh-my-openagent")
expect(savedConfig.plugin).toContain("oh-my-opencode")
})
it("adds plugin when plugin array is empty", async () => {
// given - empty plugin array
// given
const config = { plugin: [] }
writeFileSync(testConfigPath, JSON.stringify(config, null, 2) + "\n", "utf-8")
@@ -210,6 +155,6 @@ describe("addPluginToOpenCodeConfig - dual name detection", () => {
// then
expect(result.success).toBe(true)
const savedConfig = JSON.parse(readFileSync(testConfigPath, "utf-8"))
expect(savedConfig.plugin).toContain("oh-my-openagent")
expect(savedConfig.plugin).toContain("oh-my-opencode")
})
})

View File

@@ -1,7 +1,6 @@
import { fetchNpmDistTags } from "./npm-dist-tags"
const DEFAULT_PACKAGE_NAME = "oh-my-opencode"
const NEW_PACKAGE_NAME = "oh-my-openagent"
const PRIORITIZED_TAGS = ["latest", "beta", "next"] as const
function getFallbackEntry(version: string, packageName: string): string {
@@ -17,7 +16,7 @@ export async function getPluginNameWithVersion(
currentVersion: string,
packageName: string = DEFAULT_PACKAGE_NAME
): Promise<string> {
const distTags = await fetchNpmDistTags(NEW_PACKAGE_NAME)
const distTags = await fetchNpmDistTags(packageName)
if (distTags) {

View File

@@ -1,89 +1,48 @@
import { describe, it, expect } from "bun:test"
import {
PLUGIN_NAME,
LEGACY_PLUGIN_NAME,
CONFIG_BASENAME,
LEGACY_CONFIG_BASENAME,
LOG_FILENAME,
CACHE_DIR_NAME,
LEGACY_CACHE_DIR_NAME,
} from "./plugin-identity"
import { PLUGIN_NAME, CONFIG_BASENAME, LOG_FILENAME, CACHE_DIR_NAME } from "./plugin-identity"
describe("plugin-identity constants", () => {
describe("PLUGIN_NAME", () => {
it("equals oh-my-openagent", () => {
// given
// when
// then
expect(PLUGIN_NAME).toBe("oh-my-openagent")
})
})
describe("LEGACY_PLUGIN_NAME", () => {
it("equals oh-my-opencode", () => {
// given
// when
// then
expect(LEGACY_PLUGIN_NAME).toBe("oh-my-opencode")
expect(PLUGIN_NAME).toBe("oh-my-opencode")
})
})
describe("CONFIG_BASENAME", () => {
it("equals oh-my-openagent", () => {
// given
// when
// then
expect(CONFIG_BASENAME).toBe("oh-my-openagent")
})
})
describe("LEGACY_CONFIG_BASENAME", () => {
it("equals oh-my-opencode", () => {
// given
// when
// then
expect(LEGACY_CONFIG_BASENAME).toBe("oh-my-opencode")
expect(CONFIG_BASENAME).toBe("oh-my-opencode")
})
})
describe("LOG_FILENAME", () => {
it("equals oh-my-openagent.log", () => {
it("equals oh-my-opencode.log", () => {
// given
// when
// then
expect(LOG_FILENAME).toBe("oh-my-openagent.log")
expect(LOG_FILENAME).toBe("oh-my-opencode.log")
})
})
describe("CACHE_DIR_NAME", () => {
it("equals oh-my-openagent", () => {
// given
// when
// then
expect(CACHE_DIR_NAME).toBe("oh-my-openagent")
})
})
describe("LEGACY_CACHE_DIR_NAME", () => {
it("equals oh-my-opencode", () => {
// given
// when
// then
expect(LEGACY_CACHE_DIR_NAME).toBe("oh-my-opencode")
expect(CACHE_DIR_NAME).toBe("oh-my-opencode")
})
})
})

View File

@@ -1,7 +1,4 @@
export const PLUGIN_NAME = "oh-my-openagent"
export const LEGACY_PLUGIN_NAME = "oh-my-opencode"
export const CONFIG_BASENAME = "oh-my-openagent"
export const LEGACY_CONFIG_BASENAME = "oh-my-opencode"
export const LOG_FILENAME = "oh-my-openagent.log"
export const CACHE_DIR_NAME = "oh-my-openagent"
export const LEGACY_CACHE_DIR_NAME = "oh-my-opencode"
export const PLUGIN_NAME = "oh-my-opencode"
export const CONFIG_BASENAME = "oh-my-opencode"
export const LOG_FILENAME = "oh-my-opencode.log"
export const CACHE_DIR_NAME = "oh-my-opencode"