Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"metadata": {
"description": "TapTap 插件库 - 面向 AI 开发工具的工作流自动化插件集",
"version": "0.1.40",
"version": "0.1.41",
"pluginRoot": "./plugins"
},
"plugins": [
Expand Down Expand Up @@ -38,7 +38,7 @@
"name": "sync",
"source": "./plugins/sync",
"description": "项目配置同步插件,提供 MCP、LSP、Hooks、状态栏和 Claude Skills 同步功能",
"version": "0.1.30",
"version": "0.1.31",
"author": {
"name": "TapTap AI Team"
},
Expand Down
2 changes: 1 addition & 1 deletion plugins/sync/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sync",
"description": "项目配置同步插件,提供 MCP、LSP、Hooks、状态栏和 Claude Skills 同步功能",
"version": "0.1.30",
"version": "0.1.31",
"author": {
"name": "TapTap AI Team"
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/sync/.codex-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sync",
"version": "0.1.30",
"version": "0.1.31",
"description": "项目配置同步插件,提供 MCP、LSP、Hooks、状态栏和 Claude Skills 同步功能",
"author": {
"name": "TapTap AI Team"
Expand Down
34 changes: 24 additions & 10 deletions plugins/sync/scripts/ensure-codex-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -445,25 +445,39 @@ def ensure_remote_marketplace():
if remove_marketplace_config_block(user_config):
print(f"ℹ️ 已移除用户配置中的旧 marketplace 段: {normalized_cfg}")

if state["state"] in {"local_or_mismatched", "broken_remote", "unknown_clone"}:
print(f"⚠️ marketplace {marketplace} 状态异常,准备切换到远端 GitHub 源: {state['reason']}")
reset_runtime_state()
else:
print(f"ℹ️ marketplace {marketplace} 未就绪,准备注册远端 GitHub 源")
needs_reset = state["state"] in {"local_or_mismatched", "broken_remote", "unknown_clone"}

if not has_codex:
print("⚠️ codex CLI 不在 PATH,无法注册远端 marketplace;继续执行 Step 2/3")
if needs_reset:
print(
f"⚠️ marketplace {marketplace} 状态异常 ({state['reason']}),"
"但 codex CLI 不在 PATH,保留现有 clone/cache 以避免破坏可恢复状态;继续执行 Step 2/3"
)
else:
print("⚠️ codex CLI 不在 PATH,无法注册远端 marketplace;继续执行 Step 2/3")
return detect_marketplace_state()

add_cli = resolve_marketplace_cli("add")
remove_cli = resolve_marketplace_cli("remove")
if not add_cli:
print(
"⚠️ 当前 codex CLI 不支持 marketplace add;"
"已尝试 `codex plugin marketplace add` 和 `codex marketplace add`,继续执行 Step 2/3"
)
if needs_reset:
print(
f"⚠️ marketplace {marketplace} 状态异常 ({state['reason']}),"
"但当前 codex CLI 不支持 marketplace add;保留现有 clone/cache,继续执行 Step 2/3"
)
else:
print(
"⚠️ 当前 codex CLI 不支持 marketplace add;"
"已尝试 `codex plugin marketplace add` 和 `codex marketplace add`,继续执行 Step 2/3"
)
return detect_marketplace_state()

if needs_reset:
print(f"⚠️ marketplace {marketplace} 状态异常,准备切换到远端 GitHub 源: {state['reason']}")
reset_runtime_state()
else:
print(f"ℹ️ marketplace {marketplace} 未就绪,准备注册远端 GitHub 源")

add_label = " ".join(add_cli)
completed = subprocess.run(
add_cli + [marketplace_github],
Expand Down
Loading