opc-agent 4.1.17 → 4.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/install.ps1 +6 -0
- package/install.sh +18 -8
- package/package.json +1 -1
package/install.ps1
CHANGED
|
@@ -74,6 +74,12 @@ Write-Step "⚙️ 初始化 OPC Agent / Initializing"
|
|
|
74
74
|
Write-Info "运行 opc init --yes ..."
|
|
75
75
|
try { opc init --yes; Write-Ok "初始化完成 / initialized" } catch { Write-Warn "初始化跳过(可能已初始化)/ init skipped" }
|
|
76
76
|
|
|
77
|
+
# ── 进入项目目录后再检查 ──────────────────────────────────────
|
|
78
|
+
if (Test-Path "my-agent") {
|
|
79
|
+
Set-Location "my-agent"
|
|
80
|
+
Write-Info "已进入 my-agent/ 目录 / Entered my-agent/ directory"
|
|
81
|
+
}
|
|
82
|
+
|
|
77
83
|
# ── 环境检查 ──────────────────────────────────────────────────
|
|
78
84
|
Write-Step "🩺 环境检查 / Running Doctor"
|
|
79
85
|
Write-Info "运行 opc doctor ..."
|
package/install.sh
CHANGED
|
@@ -100,6 +100,13 @@ step "⚙️ 初始化 OPC Agent / Initializing"
|
|
|
100
100
|
info "运行 opc init --yes ..."
|
|
101
101
|
opc init --yes && ok "初始化完成 / initialized" || warn "初始化跳过(可能已初始化)/ init skipped (may already exist)"
|
|
102
102
|
|
|
103
|
+
# ── 进入项目目录后再检查 ──────────────────────────────────────
|
|
104
|
+
# opc init creates my-agent/ by default; cd into it for doctor
|
|
105
|
+
if [ -d "my-agent" ]; then
|
|
106
|
+
cd my-agent
|
|
107
|
+
info "已进入 my-agent/ 目录 / Entered my-agent/ directory"
|
|
108
|
+
fi
|
|
109
|
+
|
|
103
110
|
# ── 环境检查 ──────────────────────────────────────────────────
|
|
104
111
|
step "🩺 环境检查 / Running Doctor"
|
|
105
112
|
info "运行 opc doctor ..."
|
|
@@ -127,16 +134,19 @@ echo -e "${GREEN}┌────────────────────
|
|
|
127
134
|
echo -e "${GREEN}│ │${NC}"
|
|
128
135
|
echo -e "${GREEN}│ 🎊 OPC Agent 已就绪!/ OPC Agent is ready! │${NC}"
|
|
129
136
|
echo -e "${GREEN}│ │${NC}"
|
|
130
|
-
echo -e "${GREEN}│
|
|
137
|
+
echo -e "${GREEN}│ 👉 现在开始 / Get started NOW: │${NC}"
|
|
131
138
|
echo -e "${GREEN}│ │${NC}"
|
|
132
|
-
echo -e "${GREEN}│
|
|
133
|
-
echo -e "${GREEN}│ opc
|
|
134
|
-
echo -e "${GREEN}│ opc studio 🖥️ 打开面板 / Dashboard │${NC}"
|
|
135
|
-
echo -e "${GREEN}│ opc --help 📖 查看帮助 / Help │${NC}"
|
|
139
|
+
echo -e "${GREEN}│ cd my-agent 📂 进入项目目录 │${NC}"
|
|
140
|
+
echo -e "${GREEN}│ opc run 🚀 启动 Agent │${NC}"
|
|
136
141
|
echo -e "${GREEN}│ │${NC}"
|
|
137
|
-
echo -e "${GREEN}│
|
|
138
|
-
echo -e "${GREEN}│
|
|
139
|
-
echo -e "${GREEN}│
|
|
142
|
+
echo -e "${GREEN}│ 启动后访问 / After start: │${NC}"
|
|
143
|
+
echo -e "${GREEN}│ http://localhost:3000 💬 Web 聊天 / Chat │${NC}"
|
|
144
|
+
echo -e "${GREEN}│ http://localhost:4000 🎨 Studio 管理面板 │${NC}"
|
|
145
|
+
echo -e "${GREEN}│ │${NC}"
|
|
146
|
+
echo -e "${GREEN}│ 更多命令 / More commands: │${NC}"
|
|
147
|
+
echo -e "${GREEN}│ opc chat 💬 终端聊天 / Terminal chat │${NC}"
|
|
148
|
+
echo -e "${GREEN}│ opc doctor 🩺 环境检查 / Health check │${NC}"
|
|
149
|
+
echo -e "${GREEN}│ opc --help 📖 查看帮助 / Help │${NC}"
|
|
140
150
|
echo -e "${GREEN}│ │${NC}"
|
|
141
151
|
echo -e "${GREEN}│ 文档 / Docs: https://github.com/Deepleaper/opc-agent│${NC}"
|
|
142
152
|
echo -e "${GREEN}│ │${NC}"
|