opencode-code-archaeology 2.6.1 → 2.7.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/CHANGELOG.md CHANGED
@@ -1,9 +1,9 @@
1
- ## [2.6.1](https://github.com/Maleick/Code-Archaeology/compare/v2.6.0...v2.6.1) (2026-05-11)
1
+ ## [2.7.1](https://github.com/Maleick/Code-Archaeology/compare/v2.7.0...v2.7.1) (2026-05-11)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * remove hook auto-sync pulls ([#34](https://github.com/Maleick/Code-Archaeology/issues/34)) ([026db32](https://github.com/Maleick/Code-Archaeology/commit/026db324cd9d646eb701fa212e652700142b98db))
6
+ * sync source version with published tags and fix release pipeline ([#38](https://github.com/Maleick/Code-Archaeology/issues/38)) ([cd390b2](https://github.com/Maleick/Code-Archaeology/commit/cd390b2f98a963d17431b147d5b2c78cd14103a2))
7
7
 
8
8
  ## Unreleased
9
9
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.6.1
1
+ 2.7.1
@@ -5,6 +5,18 @@ set -euo pipefail
5
5
  SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
6
6
  REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
7
7
 
8
+ # ── Auto-sync: pull latest plugin code before setup ──
9
+ if [[ -z "${CODE_ARCHAEOLOGY_NO_SYNC:-}" ]]; then
10
+ # Only sync if we have a valid git remote (skip temp/policy-test repos)
11
+ if git rev-parse --verify HEAD >/dev/null 2>&1 && git remote get-url origin >/dev/null 2>&1; then
12
+ sync_gap=$(git log --oneline HEAD..origin/main 2>/dev/null | wc -l | tr -d ' ' || true)
13
+ if [[ "$sync_gap" =~ ^[0-9]+$ && "$sync_gap" -gt 0 ]]; then
14
+ echo "[code-archaeology-sync] $sync_gap commit(s) behind origin/main — pulling..."
15
+ git pull origin main >/dev/null 2>&1 || echo "[code-archaeology-sync] WARN: git pull failed, continuing with local code"
16
+ fi
17
+ fi
18
+ fi
19
+
8
20
  ARCHAEOLOGY_DIR="$REPO_ROOT/.archaeology"
9
21
 
10
22
  mkdir -p "$ARCHAEOLOGY_DIR"
@@ -55,16 +55,16 @@ if [[ ! -f "$SESSION_FILE" ]]; then
55
55
  started_at: $now,
56
56
  updated_at: $now,
57
57
  expeditions: [
58
- {phase: "survey", name: "Site Survey \u0026 Baseline", status: "pending", findings_count: 0},
58
+ {phase: "survey", name: "Site Survey & Baseline", status: "pending", findings_count: 0},
59
59
  {phase: "dead_code", name: "Dead Code Excavation", status: "pending", findings_count: 0},
60
60
  {phase: "legacy", name: "Legacy Stratum Removal", status: "pending", findings_count: 0},
61
61
  {phase: "dependencies", name: "Circular Dependency Cartography", status: "pending", findings_count: 0},
62
62
  {phase: "types_consolidate", name: "Type Catalog Consolidation", status: "pending", findings_count: 0},
63
- {phase: "types_harden", name: "Type Restoration \u0026 Hardening", status: "pending", findings_count: 0},
63
+ {phase: "types_harden", name: "Type Restoration & Hardening", status: "pending", findings_count: 0},
64
64
  {phase: "dry", name: "DRY Stratification", status: "pending", findings_count: 0},
65
65
  {phase: "errors", name: "Error Handling Stratigraphy", status: "pending", findings_count: 0},
66
- {phase: "polish", name: "Artifact Cleaning \u0026 Documentation", status: "pending", findings_count: 0},
67
- {phase: "final_verify", name: "Site Preservation \u0026 Final Catalog", status: "pending", findings_count: 0}
66
+ {phase: "polish", name: "Artifact Cleaning & Documentation", status: "pending", findings_count: 0},
67
+ {phase: "final_verify", name: "Site Preservation & Final Catalog", status: "pending", findings_count: 0}
68
68
  ],
69
69
  total_findings: 0,
70
70
  auto_fixable_count: 0,
@@ -3,6 +3,22 @@
3
3
 
4
4
  set -euo pipefail
5
5
 
6
+ # ── Auto-sync: pull latest plugin code before revert ──
7
+ if [[ -z "${CODE_ARCHAEOLOGY_NO_SYNC:-}" ]]; then
8
+ repo_root="$(git rev-parse --show-toplevel 2>/dev/null || true)"
9
+ if [[ -n "$repo_root" ]]; then
10
+ cd "$repo_root" || exit 1
11
+ # Only sync if we have a valid git remote (skip temp/policy-test repos)
12
+ if git rev-parse --verify HEAD >/dev/null 2>&1 && git remote get-url origin >/dev/null 2>&1; then
13
+ sync_gap=$(git log --oneline HEAD..origin/main 2>/dev/null | wc -l | tr -d ' ' || true)
14
+ if [[ "$sync_gap" =~ ^[0-9]+$ && "$sync_gap" -gt 0 ]]; then
15
+ echo "[code-archaeology-sync] $sync_gap commit(s) behind origin/main — pulling..."
16
+ git pull origin main >/dev/null 2>&1 || echo "[code-archaeology-sync] WARN: git pull failed, continuing with local code"
17
+ fi
18
+ fi
19
+ fi
20
+ fi
21
+
6
22
  PHASE="${1:-unknown}"
7
23
 
8
24
  echo "[$PHASE] ⚠️ Reverting changes due to failure..."
@@ -3,6 +3,22 @@
3
3
 
4
4
  set -euo pipefail
5
5
 
6
+ # ── Auto-sync: pull latest plugin code before update ──
7
+ if [[ -z "${CODE_ARCHAEOLOGY_NO_SYNC:-}" ]]; then
8
+ repo_root="$(git rev-parse --show-toplevel 2>/dev/null || true)"
9
+ if [[ -n "$repo_root" ]]; then
10
+ cd "$repo_root" || exit 1
11
+ # Only sync if we have a valid git remote (skip temp/policy-test repos)
12
+ if git rev-parse --verify HEAD >/dev/null 2>&1 && git remote get-url origin >/dev/null 2>&1; then
13
+ sync_gap=$(git log --oneline HEAD..origin/main 2>/dev/null | wc -l | tr -d ' ' || true)
14
+ if [[ "$sync_gap" =~ ^[0-9]+$ && "$sync_gap" -gt 0 ]]; then
15
+ echo "[code-archaeology-sync] $sync_gap commit(s) behind origin/main — pulling..."
16
+ git pull origin main >/dev/null 2>&1 || echo "[code-archaeology-sync] WARN: git pull failed, continuing with local code"
17
+ fi
18
+ fi
19
+ fi
20
+ fi
21
+
6
22
  PHASE="$1"
7
23
  STATUS="$2"
8
24
  FINDINGS="${3:-0}"
@@ -1,6 +1,22 @@
1
1
  #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
 
4
+ # ── Auto-sync: pull latest plugin code before verify ──
5
+ if [[ -z "${CODE_ARCHAEOLOGY_NO_SYNC:-}" ]]; then
6
+ repo_root="$(git rev-parse --show-toplevel 2>/dev/null || true)"
7
+ if [[ -n "$repo_root" ]]; then
8
+ cd "$repo_root" || exit 1
9
+ # Only sync if we have a valid git remote (skip temp/policy-test repos)
10
+ if git rev-parse --verify HEAD >/dev/null 2>&1 && git remote get-url origin >/dev/null 2>&1; then
11
+ sync_gap=$(git log --oneline HEAD..origin/main 2>/dev/null | wc -l | tr -d ' ' || true)
12
+ if [[ "$sync_gap" =~ ^[0-9]+$ && "$sync_gap" -gt 0 ]]; then
13
+ echo "[code-archaeology-sync] $sync_gap commit(s) behind origin/main — pulling..."
14
+ git pull origin main >/dev/null 2>&1 || echo "[code-archaeology-sync] WARN: git pull failed, continuing with local code"
15
+ fi
16
+ fi
17
+ fi
18
+ fi
19
+
4
20
  pack_json=$(npm pack --json --dry-run)
5
21
 
6
22
  PACK_JSON="$pack_json" node <<'NODE'
@@ -3,6 +3,22 @@
3
3
 
4
4
  set -euo pipefail
5
5
 
6
+ # ── Auto-sync: pull latest plugin code before verify ──
7
+ if [[ -z "${CODE_ARCHAEOLOGY_NO_SYNC:-}" ]]; then
8
+ repo_root="$(git rev-parse --show-toplevel 2>/dev/null || true)"
9
+ if [[ -n "$repo_root" ]]; then
10
+ cd "$repo_root" || exit 1
11
+ # Only sync if we have a valid git remote (skip temp/policy-test repos)
12
+ if git rev-parse --verify HEAD >/dev/null 2>&1 && git remote get-url origin >/dev/null 2>&1; then
13
+ sync_gap=$(git log --oneline HEAD..origin/main 2>/dev/null | wc -l | tr -d ' ' || true)
14
+ if [[ "$sync_gap" =~ ^[0-9]+$ && "$sync_gap" -gt 0 ]]; then
15
+ echo "[code-archaeology-sync] $sync_gap commit(s) behind origin/main — pulling..."
16
+ git pull origin main >/dev/null 2>&1 || echo "[code-archaeology-sync] WARN: git pull failed, continuing with local code"
17
+ fi
18
+ fi
19
+ fi
20
+ fi
21
+
6
22
  PHASE="${1:-unknown}"
7
23
  ARCHAEOLOGY_DIR=".archaeology"
8
24
  SESSION_FILE="$ARCHAEOLOGY_DIR/session.json"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-code-archaeology",
3
- "version": "2.6.1",
3
+ "version": "2.7.1",
4
4
  "description": "Excavate, catalog, and restore a codebase by removing accumulated sediment—dead code, legacy fallbacks, circular dependencies, weak types, and defensive programming slop.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",