opencode-code-archaeology 2.7.0 → 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 +2 -7
- package/VERSION +1 -1
- package/hooks/hermes/setup.sh +12 -0
- package/hooks/opencode/revert-phase.sh +16 -0
- package/hooks/opencode/update-expedition.sh +16 -0
- package/hooks/opencode/verify-package.sh +16 -0
- package/hooks/opencode/verify-phase.sh +16 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
|
|
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
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Features
|
|
10
|
-
|
|
11
|
-
* re-add guarded auto-sync to all hooks ([5976a89](https://github.com/Maleick/Code-Archaeology/commit/5976a89e4c771a63b3ed48c4bacd03c9406b4576))
|
|
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))
|
|
12
7
|
|
|
13
8
|
## Unreleased
|
|
14
9
|
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.7.
|
|
1
|
+
2.7.1
|
package/hooks/hermes/setup.sh
CHANGED
|
@@ -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"
|
|
@@ -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.7.
|
|
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",
|