@ssheleg/agent-sync 1.2.2 → 1.2.3
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
|
@@ -3,6 +3,32 @@
|
|
|
3
3
|
All notable changes to this project are documented here.
|
|
4
4
|
This project adheres to [Semantic Versioning](https://semver.org/).
|
|
5
5
|
|
|
6
|
+
## 1.2.3 — 2026-07-29
|
|
7
|
+
|
|
8
|
+
### Fixed — the guard blocked commits in projects that never installed agent-sync
|
|
9
|
+
`_lib.sh` states the contract: *"Every hook is a no-op in a project that does not use
|
|
10
|
+
agent-sync, so installing the plugin globally changes nothing elsewhere."* `guard.sh` was
|
|
11
|
+
the one hook that never sourced `_lib.sh`, and it honored that contract on only one of its
|
|
12
|
+
two branches.
|
|
13
|
+
|
|
14
|
+
- **The `git commit` branch had no configuration check.** It ran `agent_sync.py guard` on
|
|
15
|
+
every staged path; in an uninitialized project that command exits 2 with *"no
|
|
16
|
+
`.claude/agent-sync.json` in this project"*, which the loop read as "this run holds no
|
|
17
|
+
lease" — so every commit in every repo without agent-sync was blocked, with a message
|
|
18
|
+
naming a lease the project could not possibly need. The single-file branch had the check
|
|
19
|
+
all along, which is why the failure only ever surfaced on commits.
|
|
20
|
+
- `guard.sh` now sources `_lib.sh` and gates on `agent_sync_configured` like the other three
|
|
21
|
+
hooks, so the check cannot drift apart from them again. The hand-rolled `AGENT_SYNC_PY`
|
|
22
|
+
path and the duplicated `[ -f … ]` test are gone.
|
|
23
|
+
- The staged-path listing now runs against `${CLAUDE_PROJECT_DIR:-$PWD}`, the same directory
|
|
24
|
+
the configuration check reads. Before, the two could point at different repositories.
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- **`test/validate.py` exercises the no-op contract** instead of only checking syntax: every
|
|
28
|
+
hook runs against a throwaway git repository that has a staged file and no
|
|
29
|
+
`.claude/agent-sync.json`, and must exit 0. Verified red against the pre-fix `guard.sh` and
|
|
30
|
+
green after — a `bash -n` pass could never have caught this.
|
|
31
|
+
|
|
6
32
|
## 1.2.2 — 2026-07-29
|
|
7
33
|
|
|
8
34
|
### Changed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ssheleg/agent-sync",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Let concurrent coding agents share one project without colliding \u2014 leases with TTL, race-free id reservation, a run journal and a generated board, over a pluggable knowledge cloud.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"agent-sync": "bin/agent-sync.js"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-sync",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "Coordination layer for multi-agent repositories — leases with TTL, race-free ID reservation, a run journal, a cross-repo signal feed and a generated board, over a pluggable knowledge cloud.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "appvillis-com"
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
# Any other non-zero code is NON-blocking in Claude Code, so every internal
|
|
4
4
|
# failure must also exit 2 — a crashing guard that fails open guards nothing.
|
|
5
5
|
set -uo pipefail
|
|
6
|
-
|
|
6
|
+
. "${CLAUDE_PLUGIN_ROOT}/hooks/_lib.sh"
|
|
7
|
+
S="$AGENT_SYNC_PY"
|
|
8
|
+
agent_sync_configured || exit 0
|
|
7
9
|
input=$(cat)
|
|
8
10
|
|
|
9
11
|
path=$(python3 -c '
|
|
@@ -34,14 +36,12 @@ print((d.get("tool_input") or {}).get("command",""))
|
|
|
34
36
|
echo "agent-sync: '$staged' is staged but this run holds no lease on it. Acquire one, or unstage it." >&2
|
|
35
37
|
exit 2
|
|
36
38
|
fi
|
|
37
|
-
done < <(git diff --cached --name-only 2>/dev/null)
|
|
39
|
+
done < <(git -C "${CLAUDE_PROJECT_DIR:-$PWD}" diff --cached --name-only 2>/dev/null)
|
|
38
40
|
;;
|
|
39
41
|
esac
|
|
40
42
|
exit 0
|
|
41
43
|
fi
|
|
42
44
|
|
|
43
|
-
[ -f "${CLAUDE_PROJECT_DIR:-$PWD}/.claude/agent-sync.json" ] || exit 0
|
|
44
|
-
|
|
45
45
|
if out=$(python3 "$S" guard "$path" 2>&1); then
|
|
46
46
|
exit 0
|
|
47
47
|
else
|
|
@@ -4,7 +4,7 @@ description: "Use when several coding agents work one repository at the same tim
|
|
|
4
4
|
compatibility: "Requires the task-pipeline skill for its stages (npx sshlg-skills install). Needs python3 3.9+ (stdlib only, HTTP included - nothing to pip install) and bash for the hooks. The knowledge backend is configured per project; with none configured it degrades to git-file leases. Enforcement hooks are Claude Code only - on other agents the same checks run as a self-check."
|
|
5
5
|
license: MIT
|
|
6
6
|
metadata:
|
|
7
|
-
version: "1.2.
|
|
7
|
+
version: "1.2.3"
|
|
8
8
|
author: appvillis-com
|
|
9
9
|
---
|
|
10
10
|
|