opencode-code-archaeology 2.6.0 → 2.7.0

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,14 @@
1
- # [2.6.0](https://github.com/Maleick/Code-Archaeology/compare/v2.5.0...v2.6.0) (2026-05-10)
1
+ # [2.7.0](https://github.com/Maleick/Code-Archaeology/compare/v2.6.1...v2.7.0) (2026-05-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * tolerate missing origin main in Hermes setup ([#35](https://github.com/Maleick/Code-Archaeology/issues/35)) ([60744fb](https://github.com/Maleick/Code-Archaeology/commit/60744fbf19a828a784be67e4fb81ddd3976a113f))
2
7
 
3
8
 
4
9
  ### Features
5
10
 
6
- * auto-sync in all remaining hooks ([d6fda43](https://github.com/Maleick/Code-Archaeology/commit/d6fda4385dea2e2aeba1617d2c0b228b4a24ebac))
11
+ * re-add guarded auto-sync to all hooks ([5976a89](https://github.com/Maleick/Code-Archaeology/commit/5976a89e4c771a63b3ed48c4bacd03c9406b4576))
7
12
 
8
13
  ## Unreleased
9
14
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.6.0
1
+ 2.7.0
@@ -5,19 +5,6 @@ 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 expedition ──
9
- if [[ -z "${CODE_ARCHAEOLOGY_NO_SYNC:-}" ]]; 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 ' ')
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
-
21
8
  ARCHAEOLOGY_DIR="$REPO_ROOT/.archaeology"
22
9
  SESSION_FILE="$ARCHAEOLOGY_DIR/session.json"
23
10
 
@@ -5,19 +5,6 @@ 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
- 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 ' ')
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
-
21
8
  ARCHAEOLOGY_DIR="$REPO_ROOT/.archaeology"
22
9
 
23
10
  mkdir -p "$ARCHAEOLOGY_DIR"
@@ -19,18 +19,6 @@ REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null) || {
19
19
  }
20
20
  cd "$REPO_ROOT"
21
21
 
22
- # ── Auto-sync: pull latest plugin code before init ──
23
- if [[ -z "${CODE_ARCHAEOLOGY_NO_SYNC:-}" ]]; then
24
- # Only sync if we have a valid git remote (skip temp/policy-test repos)
25
- if git rev-parse --verify HEAD >/dev/null 2>&1 && git remote get-url origin >/dev/null 2>&1; then
26
- sync_gap=$(git log --oneline HEAD..origin/main 2>/dev/null | wc -l | tr -d ' ')
27
- if [[ "$sync_gap" =~ ^[0-9]+$ && "$sync_gap" -gt 0 ]]; then
28
- echo "[code-archaeology-sync] $sync_gap commit(s) behind origin/main — pulling..."
29
- git pull origin main >/dev/null 2>&1 || echo "[code-archaeology-sync] WARN: git pull failed, continuing with local code"
30
- fi
31
- fi
32
- fi
33
-
34
22
  echo "Code Archaeology v${PLUGIN_VERSION} initializing..."
35
23
 
36
24
  if ! command -v jq >/dev/null 2>&1; then
@@ -67,16 +55,16 @@ if [[ ! -f "$SESSION_FILE" ]]; then
67
55
  started_at: $now,
68
56
  updated_at: $now,
69
57
  expeditions: [
70
- {phase: "survey", name: "Site Survey \u0026 Baseline", status: "pending", findings_count: 0},
58
+ {phase: "survey", name: "Site Survey & Baseline", status: "pending", findings_count: 0},
71
59
  {phase: "dead_code", name: "Dead Code Excavation", status: "pending", findings_count: 0},
72
60
  {phase: "legacy", name: "Legacy Stratum Removal", status: "pending", findings_count: 0},
73
61
  {phase: "dependencies", name: "Circular Dependency Cartography", status: "pending", findings_count: 0},
74
62
  {phase: "types_consolidate", name: "Type Catalog Consolidation", status: "pending", findings_count: 0},
75
- {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},
76
64
  {phase: "dry", name: "DRY Stratification", status: "pending", findings_count: 0},
77
65
  {phase: "errors", name: "Error Handling Stratigraphy", status: "pending", findings_count: 0},
78
- {phase: "polish", name: "Artifact Cleaning \u0026 Documentation", status: "pending", findings_count: 0},
79
- {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}
80
68
  ],
81
69
  total_findings: 0,
82
70
  auto_fixable_count: 0,
@@ -5,22 +5,6 @@ set -euo pipefail
5
5
 
6
6
  PHASE="${1:-unknown}"
7
7
 
8
- # ── Auto-sync: pull latest plugin code before revert ──
9
- if [[ -z "${CODE_ARCHAEOLOGY_NO_SYNC:-}" ]]; then
10
- repo_root="$(git rev-parse --show-toplevel 2>/dev/null || true)"
11
- if [[ -n "$repo_root" ]]; then
12
- cd "$repo_root" || exit 1
13
- # Only sync if we have a valid git remote (skip temp/policy-test repos)
14
- if git rev-parse --verify HEAD >/dev/null 2>&1 && git remote get-url origin >/dev/null 2>&1; then
15
- sync_gap=$(git log --oneline HEAD..origin/main 2>/dev/null | wc -l | tr -d ' ')
16
- if [[ "$sync_gap" =~ ^[0-9]+$ && "$sync_gap" -gt 0 ]]; then
17
- echo "[code-archaeology-sync] $sync_gap commit(s) behind origin/main — pulling..."
18
- git pull origin main >/dev/null 2>&1 || echo "[code-archaeology-sync] WARN: git pull failed, continuing with local code"
19
- fi
20
- fi
21
- fi
22
- fi
23
-
24
8
  echo "[$PHASE] ⚠️ Reverting changes due to failure..."
25
9
 
26
10
  git stash push -m "code-archaeology-revert-$PHASE" --include-untracked >/dev/null 2>&1 || true
@@ -8,22 +8,6 @@ STATUS="$2"
8
8
  FINDINGS="${3:-0}"
9
9
  ERROR="${4:-}"
10
10
 
11
- # ── Auto-sync: pull latest plugin code before update ──
12
- if [[ -z "${CODE_ARCHAEOLOGY_NO_SYNC:-}" ]]; then
13
- repo_root="$(git rev-parse --show-toplevel 2>/dev/null || true)"
14
- if [[ -n "$repo_root" ]]; then
15
- cd "$repo_root" || exit 1
16
- # Only sync if we have a valid git remote (skip temp/policy-test repos)
17
- if git rev-parse --verify HEAD >/dev/null 2>&1 && git remote get-url origin >/dev/null 2>&1; then
18
- sync_gap=$(git log --oneline HEAD..origin/main 2>/dev/null | wc -l | tr -d ' ')
19
- if [[ "$sync_gap" =~ ^[0-9]+$ && "$sync_gap" -gt 0 ]]; then
20
- echo "[code-archaeology-sync] $sync_gap commit(s) behind origin/main — pulling..."
21
- git pull origin main >/dev/null 2>&1 || echo "[code-archaeology-sync] WARN: git pull failed, continuing with local code"
22
- fi
23
- fi
24
- fi
25
- fi
26
-
27
11
  ARCHAEOLOGY_DIR=".archaeology"
28
12
  SESSION_FILE="$ARCHAEOLOGY_DIR/session.json"
29
13
 
@@ -1,22 +1,6 @@
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 ' ')
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
-
20
4
  pack_json=$(npm pack --json --dry-run)
21
5
 
22
6
  PACK_JSON="$pack_json" node <<'NODE'
@@ -9,22 +9,6 @@ SESSION_FILE="$ARCHAEOLOGY_DIR/session.json"
9
9
 
10
10
  SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
11
11
 
12
- # ── Auto-sync: pull latest plugin code before verify ──
13
- if [[ -z "${CODE_ARCHAEOLOGY_NO_SYNC:-}" ]]; then
14
- repo_root="$(git rev-parse --show-toplevel 2>/dev/null || true)"
15
- if [[ -n "$repo_root" ]]; then
16
- cd "$repo_root" || exit 1
17
- # Only sync if we have a valid git remote (skip temp/policy-test repos)
18
- if git rev-parse --verify HEAD >/dev/null 2>&1 && git remote get-url origin >/dev/null 2>&1; then
19
- sync_gap=$(git log --oneline HEAD..origin/main 2>/dev/null | wc -l | tr -d ' ')
20
- if [[ "$sync_gap" =~ ^[0-9]+$ && "$sync_gap" -gt 0 ]]; then
21
- echo "[code-archaeology-sync] $sync_gap commit(s) behind origin/main — pulling..."
22
- git pull origin main >/dev/null 2>&1 || echo "[code-archaeology-sync] WARN: git pull failed, continuing with local code"
23
- fi
24
- fi
25
- fi
26
- fi
27
-
28
12
  # Verification commands must not be read from repository-local state.
29
13
  # A malicious repository can pre-seed .archaeology/session.json; executing commands
30
14
  # from that file would cross the repository-to-workstation trust boundary.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-code-archaeology",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
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",