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.
- {dirsql-0.0.21 → dirsql-0.0.22}/PKG-INFO +1 -1
- {dirsql-0.0.21 → dirsql-0.0.22}/pyproject.toml +1 -1
- dirsql-0.0.22/scripts/agent-preflight.sh +67 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/.claude/CLAUDE.md +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/.github/workflows/minor-release.yml +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/.github/workflows/patch-release.yml +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/.github/workflows/pr-monitor.yml +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/.github/workflows/publish.yml +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/.github/workflows/python-lint.yml +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/.github/workflows/python-test.yml +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/.github/workflows/rust-test.yml +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/.gitignore +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/.npmignore +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/Cargo.lock +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/Cargo.toml +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/LICENSE +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/README.md +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/SUMMARY.md +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/python/dirsql/__init__.py +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/python/dirsql/_async.py +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/src/db.rs +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/src/differ.rs +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/src/lib.rs +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/src/matcher.rs +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/src/scanner.rs +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/src/watcher.rs +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/tests/__init__.py +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/tests/conftest.py +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/tests/integration/__init__.py +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/tests/integration/test_async_dirsql.py +0 -0
- {dirsql-0.0.21 → dirsql-0.0.22}/tests/integration/test_dirsql.py +0 -0
|
@@ -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
|
|
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
|