dirsql 0.0.21__tar.gz → 0.0.22__tar.gz

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.
Files changed (31) hide show
  1. {dirsql-0.0.21 → dirsql-0.0.22}/PKG-INFO +1 -1
  2. {dirsql-0.0.21 → dirsql-0.0.22}/pyproject.toml +1 -1
  3. dirsql-0.0.22/scripts/agent-preflight.sh +67 -0
  4. {dirsql-0.0.21 → dirsql-0.0.22}/.claude/CLAUDE.md +0 -0
  5. {dirsql-0.0.21 → dirsql-0.0.22}/.github/workflows/minor-release.yml +0 -0
  6. {dirsql-0.0.21 → dirsql-0.0.22}/.github/workflows/patch-release.yml +0 -0
  7. {dirsql-0.0.21 → dirsql-0.0.22}/.github/workflows/pr-monitor.yml +0 -0
  8. {dirsql-0.0.21 → dirsql-0.0.22}/.github/workflows/publish.yml +0 -0
  9. {dirsql-0.0.21 → dirsql-0.0.22}/.github/workflows/python-lint.yml +0 -0
  10. {dirsql-0.0.21 → dirsql-0.0.22}/.github/workflows/python-test.yml +0 -0
  11. {dirsql-0.0.21 → dirsql-0.0.22}/.github/workflows/rust-test.yml +0 -0
  12. {dirsql-0.0.21 → dirsql-0.0.22}/.gitignore +0 -0
  13. {dirsql-0.0.21 → dirsql-0.0.22}/.npmignore +0 -0
  14. {dirsql-0.0.21 → dirsql-0.0.22}/Cargo.lock +0 -0
  15. {dirsql-0.0.21 → dirsql-0.0.22}/Cargo.toml +0 -0
  16. {dirsql-0.0.21 → dirsql-0.0.22}/LICENSE +0 -0
  17. {dirsql-0.0.21 → dirsql-0.0.22}/README.md +0 -0
  18. {dirsql-0.0.21 → dirsql-0.0.22}/SUMMARY.md +0 -0
  19. {dirsql-0.0.21 → dirsql-0.0.22}/python/dirsql/__init__.py +0 -0
  20. {dirsql-0.0.21 → dirsql-0.0.22}/python/dirsql/_async.py +0 -0
  21. {dirsql-0.0.21 → dirsql-0.0.22}/src/db.rs +0 -0
  22. {dirsql-0.0.21 → dirsql-0.0.22}/src/differ.rs +0 -0
  23. {dirsql-0.0.21 → dirsql-0.0.22}/src/lib.rs +0 -0
  24. {dirsql-0.0.21 → dirsql-0.0.22}/src/matcher.rs +0 -0
  25. {dirsql-0.0.21 → dirsql-0.0.22}/src/scanner.rs +0 -0
  26. {dirsql-0.0.21 → dirsql-0.0.22}/src/watcher.rs +0 -0
  27. {dirsql-0.0.21 → dirsql-0.0.22}/tests/__init__.py +0 -0
  28. {dirsql-0.0.21 → dirsql-0.0.22}/tests/conftest.py +0 -0
  29. {dirsql-0.0.21 → dirsql-0.0.22}/tests/integration/__init__.py +0 -0
  30. {dirsql-0.0.21 → dirsql-0.0.22}/tests/integration/test_async_dirsql.py +0 -0
  31. {dirsql-0.0.21 → dirsql-0.0.22}/tests/integration/test_dirsql.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dirsql
3
- Version: 0.0.21
3
+ Version: 0.0.22
4
4
  Requires-Dist: pytest>=8 ; extra == 'dev'
5
5
  Requires-Dist: pytest-describe>=2 ; extra == 'dev'
6
6
  Requires-Dist: pytest-asyncio>=0.23 ; extra == 'dev'
@@ -4,7 +4,7 @@ build-backend = "maturin"
4
4
 
5
5
  [project]
6
6
  name = "dirsql"
7
- version = "0.0.21"
7
+ version = "0.0.22"
8
8
  description = "Ephemeral SQL index over a local directory"
9
9
  license = "MIT"
10
10
  requires-python = ">=3.12"
@@ -0,0 +1,67 @@
1
+ #!/bin/sh
2
+
3
+ set -eu
4
+
5
+ usage() {
6
+ echo "Usage: scripts/agent-preflight.sh <commit|push|pr>" >&2
7
+ exit 2
8
+ }
9
+
10
+ fail() {
11
+ echo "agent-preflight: $1" >&2
12
+ exit 1
13
+ }
14
+
15
+ [ $# -eq 1 ] || usage
16
+
17
+ action="$1"
18
+ case "$action" in
19
+ commit|push|pr) ;;
20
+ *) usage ;;
21
+ esac
22
+
23
+ git rev-parse --show-toplevel >/dev/null 2>&1 || fail "not inside a git repository"
24
+
25
+ require_env() {
26
+ var_name="$1"
27
+ eval "value=\${$var_name-}"
28
+ [ -n "$value" ] || fail "missing required environment variable: $var_name"
29
+ }
30
+
31
+ require_env APPROVED_GIT_NAME
32
+ require_env APPROVED_GIT_EMAIL
33
+ require_env AGENT_NAME
34
+ require_env AGENT_MODEL
35
+
36
+ configured_name="$(git config --get user.name || true)"
37
+ configured_email="$(git config --get user.email || true)"
38
+ use_config_only="$(git config --bool --get user.useConfigOnly || true)"
39
+
40
+ [ "$configured_name" = "$APPROVED_GIT_NAME" ] || fail "git user.name does not match APPROVED_GIT_NAME"
41
+ [ "$configured_email" = "$APPROVED_GIT_EMAIL" ] || fail "git user.email does not match APPROVED_GIT_EMAIL"
42
+ [ "$use_config_only" = "true" ] || fail "git user.useConfigOnly must be true"
43
+
44
+ trailer="Agent: $AGENT_NAME ($AGENT_MODEL)"
45
+
46
+ case "$action" in
47
+ commit)
48
+ echo "agent-preflight: ok for commit using approved robot identity $APPROVED_GIT_EMAIL"
49
+ echo "agent-preflight: include this trailer in the commit message:"
50
+ echo "$trailer"
51
+ ;;
52
+ push|pr)
53
+ head_author_email="$(git log -1 --format=%ae HEAD)"
54
+ head_committer_email="$(git log -1 --format=%ce HEAD)"
55
+ head_message="$(git log -1 --format=%B HEAD)"
56
+
57
+ [ "$head_author_email" = "$APPROVED_GIT_EMAIL" ] || fail "HEAD author email does not match APPROVED_GIT_EMAIL"
58
+ [ "$head_committer_email" = "$APPROVED_GIT_EMAIL" ] || fail "HEAD committer email does not match APPROVED_GIT_EMAIL"
59
+ printf '%s\n' "$head_message" | grep -Fqx "$trailer" || fail "HEAD commit is missing trailer: $trailer"
60
+
61
+ if [ "$action" = "pr" ]; then
62
+ require_env GH_TOKEN
63
+ fi
64
+
65
+ echo "agent-preflight: ok for $action using approved robot identity $APPROVED_GIT_EMAIL"
66
+ ;;
67
+ esac
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes