gitvow 0.1.0__tar.gz → 0.1.2__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 (29) hide show
  1. {gitvow-0.1.0/src/gitvow.egg-info → gitvow-0.1.2}/PKG-INFO +1 -1
  2. {gitvow-0.1.0 → gitvow-0.1.2}/pyproject.toml +4 -1
  3. gitvow-0.1.2/src/gitvow/__init__.py +8 -0
  4. gitvow-0.1.2/src/gitvow/default_policy.json +82 -0
  5. {gitvow-0.1.0 → gitvow-0.1.2/src/gitvow.egg-info}/PKG-INFO +1 -1
  6. {gitvow-0.1.0 → gitvow-0.1.2}/src/gitvow.egg-info/SOURCES.txt +2 -0
  7. gitvow-0.1.2/tests/test_packaging.py +37 -0
  8. gitvow-0.1.0/src/gitvow/__init__.py +0 -3
  9. {gitvow-0.1.0 → gitvow-0.1.2}/LICENSE +0 -0
  10. {gitvow-0.1.0 → gitvow-0.1.2}/README.md +0 -0
  11. {gitvow-0.1.0 → gitvow-0.1.2}/setup.cfg +0 -0
  12. {gitvow-0.1.0 → gitvow-0.1.2}/src/gitvow/cli.py +0 -0
  13. {gitvow-0.1.0 → gitvow-0.1.2}/src/gitvow/collect.py +0 -0
  14. {gitvow-0.1.0 → gitvow-0.1.2}/src/gitvow/hooks/__init__.py +0 -0
  15. {gitvow-0.1.0 → gitvow-0.1.2}/src/gitvow/install.py +0 -0
  16. {gitvow-0.1.0 → gitvow-0.1.2}/src/gitvow/policy.py +0 -0
  17. {gitvow-0.1.0 → gitvow-0.1.2}/src/gitvow/redact.py +0 -0
  18. {gitvow-0.1.0 → gitvow-0.1.2}/src/gitvow/selftest.py +0 -0
  19. {gitvow-0.1.0 → gitvow-0.1.2}/src/gitvow/state.py +0 -0
  20. {gitvow-0.1.0 → gitvow-0.1.2}/src/gitvow/transcript.py +0 -0
  21. {gitvow-0.1.0 → gitvow-0.1.2}/src/gitvow.egg-info/dependency_links.txt +0 -0
  22. {gitvow-0.1.0 → gitvow-0.1.2}/src/gitvow.egg-info/entry_points.txt +0 -0
  23. {gitvow-0.1.0 → gitvow-0.1.2}/src/gitvow.egg-info/requires.txt +0 -0
  24. {gitvow-0.1.0 → gitvow-0.1.2}/src/gitvow.egg-info/top_level.txt +0 -0
  25. {gitvow-0.1.0 → gitvow-0.1.2}/tests/test_collect.py +0 -0
  26. {gitvow-0.1.0 → gitvow-0.1.2}/tests/test_hooks.py +0 -0
  27. {gitvow-0.1.0 → gitvow-0.1.2}/tests/test_install_cli.py +0 -0
  28. {gitvow-0.1.0 → gitvow-0.1.2}/tests/test_policy.py +0 -0
  29. {gitvow-0.1.0 → gitvow-0.1.2}/tests/test_redact.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitvow
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Provenance and policy gate for AI-agent coding sessions: session trailers on commits, redacted session notes in git, a tool-call gate, and a local ledger. No runtime dependencies.
5
5
  Author-email: Nikhil Bora <nikhil@wirevow.com>
6
6
  License: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "gitvow"
7
- version = "0.1.0"
7
+ version = "0.1.2"
8
8
  description = "Provenance and policy gate for AI-agent coding sessions: session trailers on commits, redacted session notes in git, a tool-call gate, and a local ledger. No runtime dependencies."
9
9
  readme = "README.md"
10
10
  license = {text = "Apache-2.0"}
@@ -35,6 +35,9 @@ Security = "https://github.com/wirevow/gitvow/blob/main/SECURITY.md"
35
35
  [tool.setuptools.packages.find]
36
36
  where = ["src"]
37
37
 
38
+ [tool.setuptools.package-data]
39
+ gitvow = ["default_policy.json"]
40
+
38
41
  [tool.ruff]
39
42
  line-length = 120
40
43
  target-version = "py39"
@@ -0,0 +1,8 @@
1
+ """gitvow: provenance and policy gate for AI-agent coding sessions."""
2
+
3
+ from importlib.metadata import PackageNotFoundError, version
4
+
5
+ try:
6
+ __version__ = version("gitvow")
7
+ except PackageNotFoundError: # running from a source tree that was never installed
8
+ __version__ = "0.0.0+unknown"
@@ -0,0 +1,82 @@
1
+ {
2
+ "_doc": "Default gitvow policy. Regex (Python re) on Bash command text, edited file paths, or MCP tool names. Order: deny \u2192 confirm \u2192 allow; unmatched calls are allowed and logged. Copy to <repo>/.gitvow/policy.json or ~/.gitvow/policy.json to customise.",
3
+ "bash_deny": [
4
+ {
5
+ "pattern": "\\brm\\s+-rf?\\s+(/|~|\\$HOME)(\\s|$)",
6
+ "reason": "recursive delete of root/home"
7
+ },
8
+ {
9
+ "pattern": "\\bgit\\s+push\\b.*(--force|-f\\b|\\+refs)",
10
+ "reason": "force push"
11
+ },
12
+ {
13
+ "pattern": "\\bgit\\s+(reset\\s+--hard|clean\\s+-fd|branch\\s+-D)\\b",
14
+ "reason": "destructive git history/worktree operation"
15
+ },
16
+ {
17
+ "pattern": "\\bkubectl\\s+(delete|drain|cordon)\\b",
18
+ "reason": "destructive kubectl"
19
+ },
20
+ {
21
+ "pattern": "\\b(terraform|pulumi)\\s+(destroy|apply)\\b",
22
+ "reason": "infrastructure mutation"
23
+ },
24
+ {
25
+ "pattern": "\\bDROP\\s+(TABLE|DATABASE|SCHEMA)\\b",
26
+ "reason": "destructive SQL"
27
+ },
28
+ {
29
+ "pattern": "\\baws\\s+\\S+\\s+(delete|terminate|deregister)\\S*",
30
+ "reason": "destructive AWS CLI"
31
+ },
32
+ {
33
+ "pattern": "curl[^|]*\\|\\s*(ba)?sh\\b",
34
+ "reason": "pipe remote script to shell"
35
+ }
36
+ ],
37
+ "bash_confirm": [
38
+ {
39
+ "pattern": "\\bgit\\s+push\\b",
40
+ "reason": "pushing to a remote"
41
+ },
42
+ {
43
+ "pattern": "\\bkubectl\\s+(apply|rollout|set|scale|exec)\\b",
44
+ "reason": "cluster mutation"
45
+ },
46
+ {
47
+ "pattern": "\\bhelm\\s+(install|upgrade|uninstall)\\b",
48
+ "reason": "helm release change"
49
+ },
50
+ {
51
+ "pattern": "\\bgh\\s+(pr\\s+merge|release\\s+create|repo\\s+delete)\\b",
52
+ "reason": "GitHub mutation"
53
+ }
54
+ ],
55
+ "path_confirm": [
56
+ {
57
+ "pattern": "(^|/)values/production-[a-z]+/.*\\.ya?ml$",
58
+ "reason": "edits production GitOps values"
59
+ },
60
+ {
61
+ "pattern": "(^|/)\\.github/workflows/|Jenkinsfile",
62
+ "reason": "edits CI definitions"
63
+ },
64
+ {
65
+ "pattern": "(^|/)\\.gitvow/(policy\\.json|hooks/)|(^|/)\\.claude/settings.*\\.json",
66
+ "reason": "edits the gate policy or the hook configuration"
67
+ },
68
+ {
69
+ "pattern": "(^|/)(auth|authz|authorization|gate|whitelist|allowlist)[^/]*\\.(java|go|py|ts|js|ya?ml)$",
70
+ "reason": "edits an authorization or gate-bearing file"
71
+ }
72
+ ],
73
+ "mcp_allow": [],
74
+ "mcp_deny": [
75
+ "mcp__.*__(delete|remove|destroy|drop)_.*"
76
+ ],
77
+ "llm_classifier": {
78
+ "enabled": false,
79
+ "command": "",
80
+ "_doc": "Optional: a command that reads the hook JSON on stdin and prints ALLOW|CONFIRM|DENY <reason>. Used only for calls not matched above."
81
+ }
82
+ }
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitvow
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Provenance and policy gate for AI-agent coding sessions: session trailers on commits, redacted session notes in git, a tool-call gate, and a local ledger. No runtime dependencies.
5
5
  Author-email: Nikhil Bora <nikhil@wirevow.com>
6
6
  License: Apache-2.0
@@ -4,6 +4,7 @@ pyproject.toml
4
4
  src/gitvow/__init__.py
5
5
  src/gitvow/cli.py
6
6
  src/gitvow/collect.py
7
+ src/gitvow/default_policy.json
7
8
  src/gitvow/install.py
8
9
  src/gitvow/policy.py
9
10
  src/gitvow/redact.py
@@ -20,5 +21,6 @@ src/gitvow/hooks/__init__.py
20
21
  tests/test_collect.py
21
22
  tests/test_hooks.py
22
23
  tests/test_install_cli.py
24
+ tests/test_packaging.py
23
25
  tests/test_policy.py
24
26
  tests/test_redact.py
@@ -0,0 +1,37 @@
1
+ """Build the wheel, install it into a clean venv, and run the self-check from there.
2
+
3
+ Guards against package-data omissions: a wheel without default_policy.json fails closed and blocks everything.
4
+ """
5
+
6
+ import os
7
+ import subprocess
8
+ import sys
9
+ import venv
10
+ from pathlib import Path
11
+
12
+ import pytest
13
+
14
+ ROOT = Path(__file__).resolve().parents[1]
15
+
16
+
17
+ @pytest.mark.skipif(os.environ.get("GITVOW_SKIP_PACKAGING") == "1", reason="packaging test disabled")
18
+ def test_wheel_contains_policy_and_selftest_passes(tmp_path):
19
+ subprocess.run(
20
+ [sys.executable, "-m", "pip", "wheel", "-q", "--no-deps", "-w", str(tmp_path), str(ROOT)], check=True
21
+ )
22
+ wheel = next(tmp_path.glob("gitvow-*.whl"))
23
+ import zipfile
24
+
25
+ assert "gitvow/default_policy.json" in zipfile.ZipFile(wheel).namelist()
26
+ env_dir = tmp_path / "venv"
27
+ venv.EnvBuilder(with_pip=True).create(env_dir)
28
+ bin_dir = env_dir / ("Scripts" if os.name == "nt" else "bin")
29
+ subprocess.run([str(bin_dir / "python"), "-m", "pip", "install", "-q", str(wheel)], check=True)
30
+ r = subprocess.run([str(bin_dir / "gitvow"), "selftest"], capture_output=True, text=True, cwd=tmp_path)
31
+ assert r.returncode == 0, r.stdout + r.stderr
32
+ assert "0 failed" in r.stdout
33
+ import re
34
+
35
+ expected = re.search(r'^version = "([^"]+)"', (ROOT / "pyproject.toml").read_text(), re.M).group(1)
36
+ v = subprocess.run([str(bin_dir / "gitvow"), "--version"], capture_output=True, text=True, check=True)
37
+ assert v.stdout.strip() == f"gitvow {expected}"
@@ -1,3 +0,0 @@
1
- """gitvow: provenance and policy gate for AI-agent coding sessions."""
2
-
3
- __version__ = "0.1.0"
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