openmoneta-dev-kit 1.11.0 → 1.11.1

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/VERSION CHANGED
@@ -1 +1 @@
1
- 1.11.0
1
+ 1.11.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmoneta-dev-kit",
3
- "version": "1.11.0",
3
+ "version": "1.11.1",
4
4
  "description": "OpenMoneta Dev Kit — Biến Cursor IDE / OpenCode thành team developer hoàn chỉnh với quy trình 6 bước, adaptive planning, hooks enforcement, và token-aware doc routing",
5
5
  "keywords": [
6
6
  "cursor",
package/update.ps1 CHANGED
@@ -160,11 +160,25 @@ if ($CurrentVersion -eq $NewVersion) {
160
160
  Write-Host "Đã ở phiên bản mới nhất (v$CurrentVersion). Vẫn cài lại để đảm bảo đồng bộ."
161
161
  }
162
162
 
163
- # === Step 2: Global install ===
163
+ # === Step 2: Global install (Cursor) ===
164
164
  Write-Host ""
165
- Write-Host "==> Chạy install.ps1..."
165
+ Write-Host "==> Chạy install.ps1 (Cursor)..."
166
166
  & "$RepoDir\install.ps1" -Yes
167
167
 
168
+ # === Step 2B: Global install (OpenCode) ===
169
+ # Chỉ chạy nếu máy đã cài OpenMoneta cho OpenCode hoặc có binary `opencode`.
170
+ $OpenCodeDir = if ($env:XDG_CONFIG_HOME) { "$env:XDG_CONFIG_HOME\opencode" } else { "$env:USERPROFILE\.config\opencode" }
171
+ if ((Test-Path "$OpenCodeDir\.openmoneta-version") -or (Get-Command opencode -ErrorAction SilentlyContinue)) {
172
+ Write-Host ""
173
+ Write-Host "==> Phát hiện OpenCode -> chạy install-opencode.ps1..."
174
+ & "$RepoDir\install-opencode.ps1" -Yes
175
+ }
176
+ else {
177
+ Write-Host ""
178
+ Write-Host "ℹ️ Không phát hiện OpenCode, bỏ qua install-opencode.ps1."
179
+ Write-Host " Cài tay nếu cần: pwsh $RepoDir\install-opencode.ps1"
180
+ }
181
+
168
182
  Write-Host ""
169
183
  Write-Host "✅ Global update hoàn tất: v$CurrentVersion -> v$NewVersion" -ForegroundColor Green
170
184
  if ($CurrentVersion -ne $NewVersion) {
package/update.sh CHANGED
@@ -185,11 +185,24 @@ if [[ "$CURRENT_VERSION" == "$NEW_VERSION" ]]; then
185
185
  echo "Đã ở phiên bản mới nhất (v$CURRENT_VERSION). Vẫn cài lại để đảm bảo đồng bộ."
186
186
  fi
187
187
 
188
- # === Step 2: Global install ===
188
+ # === Step 2: Global install (Cursor) ===
189
189
  echo ""
190
- echo "==> Chạy install.sh..."
190
+ echo "==> Chạy install.sh (Cursor)..."
191
191
  bash "$REPO_DIR/install.sh" --yes
192
192
 
193
+ # === Step 2B: Global install (OpenCode) ===
194
+ # Chỉ chạy nếu máy đã cài OpenMoneta cho OpenCode hoặc có binary `opencode`.
195
+ OPENCODE_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/opencode"
196
+ if [[ -f "$OPENCODE_DIR/.openmoneta-version" ]] || command -v opencode >/dev/null 2>&1; then
197
+ echo ""
198
+ echo "==> Phát hiện OpenCode → chạy install-opencode.sh..."
199
+ bash "$REPO_DIR/install-opencode.sh" --yes
200
+ else
201
+ echo ""
202
+ echo "ℹ️ Không phát hiện OpenCode, bỏ qua install-opencode.sh."
203
+ echo " Cài tay nếu cần: bash $REPO_DIR/install-opencode.sh"
204
+ fi
205
+
193
206
  echo ""
194
207
  echo "✅ Global update hoàn tất: v$CURRENT_VERSION → v$NEW_VERSION"
195
208
  echo ""