opencode-code-archaeology 2.6.0 → 2.6.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 +3 -3
- package/VERSION +1 -1
- package/hooks/hermes/runner.sh +0 -13
- package/hooks/hermes/setup.sh +0 -13
- package/hooks/opencode/init.sh +0 -12
- package/hooks/opencode/revert-phase.sh +0 -16
- package/hooks/opencode/update-expedition.sh +0 -16
- package/hooks/opencode/verify-package.sh +0 -16
- package/hooks/opencode/verify-phase.sh +0 -16
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
## [2.6.1](https://github.com/Maleick/Code-Archaeology/compare/v2.6.0...v2.6.1) (2026-05-11)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
* auto-sync
|
|
6
|
+
* remove hook auto-sync pulls ([#34](https://github.com/Maleick/Code-Archaeology/issues/34)) ([026db32](https://github.com/Maleick/Code-Archaeology/commit/026db324cd9d646eb701fa212e652700142b98db))
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.6.
|
|
1
|
+
2.6.1
|
package/hooks/hermes/runner.sh
CHANGED
|
@@ -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
|
|
package/hooks/hermes/setup.sh
CHANGED
|
@@ -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"
|
package/hooks/opencode/init.sh
CHANGED
|
@@ -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
|
|
@@ -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.
|
|
3
|
+
"version": "2.6.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",
|