eklavya 1.44.0 → 1.44.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eklavya",
|
|
3
3
|
"displayName": "Eklavya",
|
|
4
|
-
"version": "1.44.
|
|
4
|
+
"version": "1.44.1",
|
|
5
5
|
"description": "Learn while your agent works. Turns coding-agent generation time into adaptive, Socratic learning grounded in the code being written.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Ajay Kumar"
|
|
@@ -32,7 +32,8 @@ Use POSIX `sh`; the installed hook runs through `/bin/sh`. Missing repository,
|
|
|
32
32
|
config, `jq`, `sqlite3`, database or gate row allows the commit. Database query
|
|
33
33
|
errors also allow it. Missing dependencies warn on stderr.
|
|
34
34
|
|
|
35
|
-
Exit 1 only when
|
|
35
|
+
Exit 1 only when the latest gate row for this checkout or, in a linked worktree,
|
|
36
|
+
its main checkout exists and `passed` is not `1`.
|
|
36
37
|
Do not add an operational error that prevents a commit.
|
|
37
38
|
|
|
38
39
|
## Keep duplicated logic aligned
|
|
@@ -45,8 +46,9 @@ Do not add an operational error that prevents a commit.
|
|
|
45
46
|
| In-session commit detection | `mcp/src/hooks/pre-tool-gate.ts` and `commit-lib.ts` |
|
|
46
47
|
|
|
47
48
|
The script trusts persisted `passed`; it must not duplicate passing-grade or
|
|
48
|
-
threshold arithmetic. It looks up the latest gate
|
|
49
|
-
in-session hook uses a session ID. In jq, use explicit
|
|
49
|
+
threshold arithmetic. It looks up the latest gate keyed on the checkout or its
|
|
50
|
+
main checkout, whereas the in-session hook uses a session ID. In jq, use explicit
|
|
51
|
+
`if`/`elif` for booleans:
|
|
50
52
|
`//` treats `false` as absent and can re-enable a disabled legacy gate.
|
|
51
53
|
|
|
52
54
|
## Documentation and verification
|
|
@@ -112,16 +112,20 @@ fi
|
|
|
112
112
|
DB=$(eklavya_db)
|
|
113
113
|
[ -f "$DB" ] || exit 0
|
|
114
114
|
|
|
115
|
+
# In a linked worktree the session usually keys its gate on the main checkout,
|
|
116
|
+
# where Claude was started, not on the worktree it built in. Either row counts
|
|
117
|
+
# and the latest wins. Outside a worktree both names are the same checkout.
|
|
115
118
|
ESCAPED=$(printf '%s' "$REPO" | sed "s/'/''/g")
|
|
119
|
+
ESCAPED_PROJECT=$(printf '%s' "$PROJECT" | sed "s/'/''/g")
|
|
116
120
|
GATE=$(sqlite3 -noheader -batch -cmd ".timeout 2000" "$DB" "
|
|
117
121
|
SELECT passed || '|' || required || '|' || answered
|
|
118
122
|
FROM gates
|
|
119
|
-
WHERE repo
|
|
123
|
+
WHERE repo IN ('$ESCAPED', '$ESCAPED_PROJECT')
|
|
120
124
|
ORDER BY updated_at DESC
|
|
121
125
|
LIMIT 1;" 2>/dev/null) || exit 0
|
|
122
126
|
|
|
123
|
-
# No gate for this
|
|
124
|
-
# nothing to have passed.
|
|
127
|
+
# No gate for this checkout means Eklavya never taught anything here, so there
|
|
128
|
+
# is nothing to have passed.
|
|
125
129
|
[ -n "$GATE" ] || exit 0
|
|
126
130
|
|
|
127
131
|
PASSED=$(printf '%s' "$GATE" | cut -d'|' -f1)
|
package/package.json
CHANGED