giton 0.1.2__tar.gz → 0.1.5__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.
- {giton-0.1.2 → giton-0.1.5}/.gitignore +1 -0
- {giton-0.1.2 → giton-0.1.5}/.idea/workspace.xml +78 -68
- giton-0.1.5/CHANGELOG.md +141 -0
- {giton-0.1.2 → giton-0.1.5}/PKG-INFO +71 -7
- {giton-0.1.2 → giton-0.1.5}/README.md +70 -6
- giton-0.1.5/VERSION +1 -0
- giton-0.1.5/examples/advanced/Dockerfile +33 -0
- giton-0.1.5/examples/advanced/README.md +55 -0
- giton-0.1.5/examples/advanced/logs/log.txt +64 -0
- giton-0.1.5/examples/advanced/main.py +156 -0
- giton-0.1.5/examples/basic/Dockerfile +33 -0
- giton-0.1.5/examples/basic/README.md +51 -0
- giton-0.1.5/examples/basic/logs/log.txt +13 -0
- giton-0.1.5/examples/basic/main.py +67 -0
- giton-0.1.5/examples/testing/Dockerfile +37 -0
- giton-0.1.5/examples/testing/README.md +166 -0
- giton-0.1.5/examples/testing/docker-compose.yml +11 -0
- giton-0.1.5/examples/testing/logs/log.txt +17 -0
- giton-0.1.5/examples/testing/sample_project/pyproject.toml +12 -0
- giton-0.1.5/examples/testing/sample_project/src/example.py +20 -0
- giton-0.1.5/examples/testing/sample_project/tests/test_example.py +30 -0
- giton-0.1.5/examples/testing/test_giton_integration.py +178 -0
- {giton-0.1.2 → giton-0.1.5}/goal.yaml +2 -2
- {giton-0.1.2 → giton-0.1.5}/pyproject.toml +1 -1
- {giton-0.1.2 → giton-0.1.5}/src/giton/__init__.py +1 -1
- giton-0.1.5/src/giton/cli.py +421 -0
- giton-0.1.5/src/giton/history.py +140 -0
- {giton-0.1.2 → giton-0.1.5}/src/giton/hooks.py +1 -1
- giton-0.1.5/src/giton/interactive.py +58 -0
- giton-0.1.5/src/giton/policies.py +165 -0
- giton-0.1.5/src/giton/repo_config.py +101 -0
- {giton-0.1.2 → giton-0.1.5}/src/giton/runner.py +46 -9
- {giton-0.1.2 → giton-0.1.5}/src/giton/shell.py +39 -2
- giton-0.1.5/tests/test_history.py +133 -0
- giton-0.1.5/tests/test_policies.py +98 -0
- {giton-0.1.2 → giton-0.1.5}/uv.lock +1 -1
- giton-0.1.2/CHANGELOG.md +0 -52
- giton-0.1.2/VERSION +0 -1
- giton-0.1.2/src/giton/cli.py +0 -171
- {giton-0.1.2 → giton-0.1.5}/.idea/.gitignore +0 -0
- {giton-0.1.2 → giton-0.1.5}/.koru/event-store.jsonl +0 -0
- {giton-0.1.2 → giton-0.1.5}/.koru/events/observability.jsonl +0 -0
- {giton-0.1.2 → giton-0.1.5}/.koru/history.jsonl +0 -0
- {giton-0.1.2 → giton-0.1.5}/.koru/onboarding.json +0 -0
- {giton-0.1.2 → giton-0.1.5}/.koru/project.json +0 -0
- {giton-0.1.2 → giton-0.1.5}/.planfile/.koru/autonomous-state.json +0 -0
- {giton-0.1.2 → giton-0.1.5}/.planfile/.koru/autonomy-telemetry.json +0 -0
- {giton-0.1.2 → giton-0.1.5}/.planfile/.koru/event-store.jsonl +0 -0
- {giton-0.1.2 → giton-0.1.5}/.planfile/.koru/nfo-events.jsonl +0 -0
- {giton-0.1.2 → giton-0.1.5}/.planfile/.koru/operator-steps/mcp_koru.ticket +0 -0
- {giton-0.1.2 → giton-0.1.5}/.planfile/.koru/operator-steps/self_control.ticket +0 -0
- {giton-0.1.2 → giton-0.1.5}/.planfile/.koru/queue-runner.lock +0 -0
- {giton-0.1.2 → giton-0.1.5}/.planfile/.koru/serve-endpoint.json +0 -0
- {giton-0.1.2 → giton-0.1.5}/.planfile/config.yaml +0 -0
- {giton-0.1.2 → giton-0.1.5}/.planfile/sprints/current.yaml +0 -0
- {giton-0.1.2 → giton-0.1.5}/.planfile/sprints/current.yaml.lock +0 -0
- {giton-0.1.2 → giton-0.1.5}/LICENSE +0 -0
- {giton-0.1.2 → giton-0.1.5}/TODO.md +0 -0
- {giton-0.1.2 → giton-0.1.5}/koru.yaml +0 -0
- {giton-0.1.2 → giton-0.1.5}/src/giton/__main__.py +0 -0
- {giton-0.1.2 → giton-0.1.5}/src/giton/catalog.py +0 -0
- {giton-0.1.2 → giton-0.1.5}/src/giton/config.py +0 -0
- {giton-0.1.2 → giton-0.1.5}/src/giton/context.py +0 -0
- {giton-0.1.2 → giton-0.1.5}/src/giton/plugins.py +0 -0
- {giton-0.1.2 → giton-0.1.5}/tests/__init__.py +0 -0
- {giton-0.1.2 → giton-0.1.5}/tests/test_basic.py +0 -0
|
@@ -5,27 +5,37 @@
|
|
|
5
5
|
</component>
|
|
6
6
|
<component name="ChangeListManager">
|
|
7
7
|
<list default="true" id="9532a670-1f01-4d5e-9501-f3491f105c64" name="Changes" comment="">
|
|
8
|
-
<change afterPath="$PROJECT_DIR
|
|
9
|
-
<change afterPath="$PROJECT_DIR
|
|
10
|
-
<change afterPath="$PROJECT_DIR
|
|
11
|
-
<change afterPath="$PROJECT_DIR
|
|
12
|
-
<change afterPath="$PROJECT_DIR
|
|
13
|
-
<change afterPath="$PROJECT_DIR
|
|
14
|
-
<change afterPath="$PROJECT_DIR
|
|
15
|
-
<change afterPath="$PROJECT_DIR
|
|
16
|
-
<change afterPath="$PROJECT_DIR
|
|
17
|
-
<change afterPath="$PROJECT_DIR
|
|
18
|
-
<change afterPath="$PROJECT_DIR
|
|
19
|
-
<change afterPath="$PROJECT_DIR
|
|
20
|
-
<change afterPath="$PROJECT_DIR
|
|
21
|
-
<change afterPath="$PROJECT_DIR
|
|
22
|
-
<change afterPath="$PROJECT_DIR
|
|
23
|
-
<change afterPath="$PROJECT_DIR
|
|
24
|
-
<change afterPath="$PROJECT_DIR$/
|
|
25
|
-
<change
|
|
8
|
+
<change afterPath="$PROJECT_DIR$/examples/advanced/Dockerfile" afterDir="false" />
|
|
9
|
+
<change afterPath="$PROJECT_DIR$/examples/advanced/README.md" afterDir="false" />
|
|
10
|
+
<change afterPath="$PROJECT_DIR$/examples/advanced/logs/log.txt" afterDir="false" />
|
|
11
|
+
<change afterPath="$PROJECT_DIR$/examples/advanced/main.py" afterDir="false" />
|
|
12
|
+
<change afterPath="$PROJECT_DIR$/examples/basic/Dockerfile" afterDir="false" />
|
|
13
|
+
<change afterPath="$PROJECT_DIR$/examples/basic/README.md" afterDir="false" />
|
|
14
|
+
<change afterPath="$PROJECT_DIR$/examples/basic/logs/log.txt" afterDir="false" />
|
|
15
|
+
<change afterPath="$PROJECT_DIR$/examples/basic/main.py" afterDir="false" />
|
|
16
|
+
<change afterPath="$PROJECT_DIR$/examples/testing/Dockerfile" afterDir="false" />
|
|
17
|
+
<change afterPath="$PROJECT_DIR$/examples/testing/README.md" afterDir="false" />
|
|
18
|
+
<change afterPath="$PROJECT_DIR$/examples/testing/docker-compose.yml" afterDir="false" />
|
|
19
|
+
<change afterPath="$PROJECT_DIR$/examples/testing/logs/log.txt" afterDir="false" />
|
|
20
|
+
<change afterPath="$PROJECT_DIR$/examples/testing/sample_project/pyproject.toml" afterDir="false" />
|
|
21
|
+
<change afterPath="$PROJECT_DIR$/examples/testing/sample_project/src/example.py" afterDir="false" />
|
|
22
|
+
<change afterPath="$PROJECT_DIR$/examples/testing/sample_project/tests/test_example.py" afterDir="false" />
|
|
23
|
+
<change afterPath="$PROJECT_DIR$/examples/testing/test_giton_integration.py" afterDir="false" />
|
|
24
|
+
<change afterPath="$PROJECT_DIR$/src/giton/history.py" afterDir="false" />
|
|
25
|
+
<change afterPath="$PROJECT_DIR$/src/giton/interactive.py" afterDir="false" />
|
|
26
|
+
<change afterPath="$PROJECT_DIR$/src/giton/policies.py" afterDir="false" />
|
|
27
|
+
<change afterPath="$PROJECT_DIR$/src/giton/repo_config.py" afterDir="false" />
|
|
28
|
+
<change afterPath="$PROJECT_DIR$/tests/test_history.py" afterDir="false" />
|
|
29
|
+
<change afterPath="$PROJECT_DIR$/tests/test_policies.py" afterDir="false" />
|
|
30
|
+
<change beforePath="$PROJECT_DIR$/VERSION" beforeDir="false" afterPath="$PROJECT_DIR$/VERSION" afterDir="false" />
|
|
26
31
|
<change beforePath="$PROJECT_DIR$/goal.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/goal.yaml" afterDir="false" />
|
|
27
32
|
<change beforePath="$PROJECT_DIR$/pyproject.toml" beforeDir="false" afterPath="$PROJECT_DIR$/pyproject.toml" afterDir="false" />
|
|
28
|
-
<change beforePath="$PROJECT_DIR$/src/
|
|
33
|
+
<change beforePath="$PROJECT_DIR$/src/giton/__init__.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/giton/__init__.py" afterDir="false" />
|
|
34
|
+
<change beforePath="$PROJECT_DIR$/src/giton/cli.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/giton/cli.py" afterDir="false" />
|
|
35
|
+
<change beforePath="$PROJECT_DIR$/src/giton/hooks.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/giton/hooks.py" afterDir="false" />
|
|
36
|
+
<change beforePath="$PROJECT_DIR$/src/giton/runner.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/giton/runner.py" afterDir="false" />
|
|
37
|
+
<change beforePath="$PROJECT_DIR$/src/giton/shell.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/giton/shell.py" afterDir="false" />
|
|
38
|
+
<change beforePath="$PROJECT_DIR$/uv.lock" beforeDir="false" afterPath="$PROJECT_DIR$/uv.lock" afterDir="false" />
|
|
29
39
|
</list>
|
|
30
40
|
<option name="SHOW_DIALOG" value="false" />
|
|
31
41
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -45,61 +55,61 @@
|
|
|
45
55
|
</component>
|
|
46
56
|
<component name="NextEditCompletionFeaturesState">
|
|
47
57
|
<decayedCancelled>
|
|
48
|
-
<entry key="MS100" value="1.
|
|
49
|
-
<entry key="MS500" value="3.
|
|
50
|
-
<entry key="S2" value="
|
|
51
|
-
<entry key="S5" value="
|
|
52
|
-
<entry key="S10" value="
|
|
53
|
-
<entry key="S30" value="
|
|
54
|
-
<entry key="S60" value="
|
|
55
|
-
<entry key="M2" value="
|
|
56
|
-
<entry key="M5" value="
|
|
57
|
-
<entry key="M10" value="
|
|
58
|
-
<entry key="M15" value="
|
|
59
|
-
<entry key="M30" value="
|
|
60
|
-
<entry key="H1" value="
|
|
61
|
-
<entry key="H2" value="
|
|
62
|
-
<entry key="H4" value="
|
|
63
|
-
<entry key="D1" value="
|
|
64
|
-
<entry key="W1" value="
|
|
58
|
+
<entry key="MS100" value="1.1840429966024764" />
|
|
59
|
+
<entry key="MS500" value="3.008906012331558" />
|
|
60
|
+
<entry key="S2" value="4.354063637612695" />
|
|
61
|
+
<entry key="S5" value="4.726721936322459" />
|
|
62
|
+
<entry key="S10" value="4.867729736902627" />
|
|
63
|
+
<entry key="S30" value="6.007189586843474" />
|
|
64
|
+
<entry key="S60" value="8.687315057904945" />
|
|
65
|
+
<entry key="M2" value="12.390366740242463" />
|
|
66
|
+
<entry key="M5" value="20.028499727277765" />
|
|
67
|
+
<entry key="M10" value="28.647532831651066" />
|
|
68
|
+
<entry key="M15" value="34.56395301166038" />
|
|
69
|
+
<entry key="M30" value="44.528965358361326" />
|
|
70
|
+
<entry key="H1" value="52.2573782114977" />
|
|
71
|
+
<entry key="H2" value="57.174224782901376" />
|
|
72
|
+
<entry key="H4" value="59.96191489846307" />
|
|
73
|
+
<entry key="D1" value="62.475178727914766" />
|
|
74
|
+
<entry key="W1" value="62.92455821571766" />
|
|
65
75
|
</decayedCancelled>
|
|
66
76
|
<decayedSelected>
|
|
67
77
|
<entry key="MS100" value="0.0" />
|
|
68
78
|
<entry key="MS500" value="0.0" />
|
|
69
|
-
<entry key="S2" value="
|
|
70
|
-
<entry key="S5" value="
|
|
71
|
-
<entry key="S10" value="
|
|
72
|
-
<entry key="S30" value="
|
|
73
|
-
<entry key="S60" value="
|
|
74
|
-
<entry key="M2" value="0.
|
|
75
|
-
<entry key="M5" value="0.
|
|
76
|
-
<entry key="M10" value="0.
|
|
77
|
-
<entry key="M15" value="0.
|
|
78
|
-
<entry key="M30" value="0.
|
|
79
|
-
<entry key="H1" value="0.
|
|
80
|
-
<entry key="H2" value="0.
|
|
81
|
-
<entry key="H4" value="0.
|
|
82
|
-
<entry key="D1" value="0.
|
|
83
|
-
<entry key="W1" value="0.
|
|
79
|
+
<entry key="S2" value="1.750725986257552E-98" />
|
|
80
|
+
<entry key="S5" value="7.893820947435761E-40" />
|
|
81
|
+
<entry key="S10" value="2.8095944453667604E-20" />
|
|
82
|
+
<entry key="S30" value="3.0400533972351147E-7" />
|
|
83
|
+
<entry key="S60" value="5.513667923655825E-4" />
|
|
84
|
+
<entry key="M2" value="0.023481200828866962" />
|
|
85
|
+
<entry key="M5" value="0.22299140361394168" />
|
|
86
|
+
<entry key="M10" value="0.4722196561071362" />
|
|
87
|
+
<entry key="M15" value="0.6064049071866291" />
|
|
88
|
+
<entry key="M30" value="0.7787200441664701" />
|
|
89
|
+
<entry key="H1" value="0.8824511568163249" />
|
|
90
|
+
<entry key="H2" value="0.9393887144395157" />
|
|
91
|
+
<entry key="H4" value="0.9692206737577957" />
|
|
92
|
+
<entry key="D1" value="0.9948030578200769" />
|
|
93
|
+
<entry key="W1" value="0.9992559207852288" />
|
|
84
94
|
</decayedSelected>
|
|
85
95
|
<decayedShown>
|
|
86
|
-
<entry key="MS100" value="1.
|
|
87
|
-
<entry key="MS500" value="3.
|
|
88
|
-
<entry key="S2" value="
|
|
89
|
-
<entry key="S5" value="
|
|
90
|
-
<entry key="S10" value="
|
|
91
|
-
<entry key="S30" value="
|
|
92
|
-
<entry key="S60" value="
|
|
93
|
-
<entry key="M2" value="
|
|
94
|
-
<entry key="M5" value="
|
|
95
|
-
<entry key="M10" value="
|
|
96
|
-
<entry key="M15" value="
|
|
97
|
-
<entry key="M30" value="
|
|
98
|
-
<entry key="H1" value="
|
|
99
|
-
<entry key="H2" value="
|
|
100
|
-
<entry key="H4" value="
|
|
101
|
-
<entry key="D1" value="
|
|
102
|
-
<entry key="W1" value="
|
|
96
|
+
<entry key="MS100" value="1.1676890724774422" />
|
|
97
|
+
<entry key="MS500" value="3.0000523431376207" />
|
|
98
|
+
<entry key="S2" value="4.350775089905487" />
|
|
99
|
+
<entry key="S5" value="4.725285817140984" />
|
|
100
|
+
<entry key="S10" value="4.866969299487099" />
|
|
101
|
+
<entry key="S30" value="6.006050466143283" />
|
|
102
|
+
<entry key="S60" value="8.686237365128678" />
|
|
103
|
+
<entry key="M2" value="12.412310145277253" />
|
|
104
|
+
<entry key="M5" value="20.250271675744575" />
|
|
105
|
+
<entry key="M10" value="29.118834037658004" />
|
|
106
|
+
<entry key="M15" value="35.16962424632721" />
|
|
107
|
+
<entry key="M30" value="45.307228651231846" />
|
|
108
|
+
<entry key="H1" value="53.13956938106742" />
|
|
109
|
+
<entry key="H2" value="58.113473925261886" />
|
|
110
|
+
<entry key="H4" value="60.93106313433165" />
|
|
111
|
+
<entry key="D1" value="63.46996931990426" />
|
|
112
|
+
<entry key="W1" value="63.92381234570905" />
|
|
103
113
|
</decayedShown>
|
|
104
114
|
</component>
|
|
105
115
|
<component name="ProjectColorInfo"><,
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.5] - 2026-05-27
|
|
11
|
+
|
|
12
|
+
### Docs
|
|
13
|
+
- Update README.md
|
|
14
|
+
|
|
15
|
+
### Other
|
|
16
|
+
- Update .idea/misc.xml
|
|
17
|
+
|
|
18
|
+
## [0.1.4] - 2026-05-27
|
|
19
|
+
|
|
20
|
+
### Docs
|
|
21
|
+
- Update CHANGELOG.md
|
|
22
|
+
- Update README.md
|
|
23
|
+
- Update examples/advanced/README.md
|
|
24
|
+
- Update examples/basic/README.md
|
|
25
|
+
- Update examples/testing/README.md
|
|
26
|
+
|
|
27
|
+
### Test
|
|
28
|
+
- Update tests/test_history.py
|
|
29
|
+
- Update tests/test_policies.py
|
|
30
|
+
|
|
31
|
+
### Other
|
|
32
|
+
- Update VERSION
|
|
33
|
+
- Update examples/advanced/Dockerfile
|
|
34
|
+
- Update examples/advanced/logs/log.txt
|
|
35
|
+
- Update examples/advanced/main.py
|
|
36
|
+
- Update examples/basic/Dockerfile
|
|
37
|
+
- Update examples/basic/logs/log.txt
|
|
38
|
+
- Update examples/basic/main.py
|
|
39
|
+
- Update examples/testing/Dockerfile
|
|
40
|
+
- Update examples/testing/docker-compose.yml
|
|
41
|
+
- Update examples/testing/logs/log.txt
|
|
42
|
+
- ... and 5 more files
|
|
43
|
+
|
|
44
|
+
## [0.1.4] - 2026-05-27
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
- New `commit-msg` git hook: validates the message file before the
|
|
48
|
+
commit is finalized. Aborts with a tip when policies fail; user's
|
|
49
|
+
message is preserved so they can re-run `git commit`.
|
|
50
|
+
Installed automatically by `giton init`.
|
|
51
|
+
- `giton fixup [--target SHA] [--yes]` — creates a `fixup!` commit
|
|
52
|
+
from the staged index, recording a backup ref under
|
|
53
|
+
`refs/giton/backup/fixup-<timestamp>` first.
|
|
54
|
+
- New `giton history` sub-app:
|
|
55
|
+
- `history log [-n N] [-r RANGE]` — show commits eligible for push,
|
|
56
|
+
highlighting `fixup!` entries.
|
|
57
|
+
- `history clean [--base REF] [--yes] [-i]` — safe
|
|
58
|
+
`git rebase -i --autosquash` with backup ref
|
|
59
|
+
`refs/giton/backup/clean-<timestamp>` and headless edit by default
|
|
60
|
+
(`GIT_SEQUENCE_EDITOR=true GIT_EDITOR=true`).
|
|
61
|
+
- New module `giton/history.py` with reusable primitives:
|
|
62
|
+
`head_sha`, `make_backup_ref`, `list_log`, `upstream_range`,
|
|
63
|
+
`create_fixup`, `has_staged_changes`, `autosquash`.
|
|
64
|
+
- Tests: `tests/test_history.py` (8 cases) covering hook installation,
|
|
65
|
+
backup refs, fixup creation, autosquash, CLI fixup flow, and the
|
|
66
|
+
`commit-msg` hook on both invalid and valid subjects.
|
|
67
|
+
|
|
68
|
+
### Changed
|
|
69
|
+
- `policies.conventional_commits` and `policies.no_wip_commits` now
|
|
70
|
+
also fire on the `commit-msg` trigger.
|
|
71
|
+
- `repo_config` defaults gained a `commit-msg` entry with
|
|
72
|
+
`fail_on_policy: true`.
|
|
73
|
+
- Fixed `examples/testing/test_giton_integration.py`: positional
|
|
74
|
+
`policy check pre-commit` form replaced with `--trigger pre-commit`
|
|
75
|
+
and the result is now asserted.
|
|
76
|
+
|
|
77
|
+
## [0.1.3] - 2026-05-27
|
|
78
|
+
|
|
79
|
+
### Added
|
|
80
|
+
- Built-in policy engine (`giton/policies.py`) with four checks:
|
|
81
|
+
`conventional_commits`, `no_wip_commits`, `no_secrets`,
|
|
82
|
+
`max_file_size`. Runs on every hook trigger, no plugins required.
|
|
83
|
+
- Per-repo configuration file `.giton/config.yaml` with per-policy
|
|
84
|
+
options and per-trigger `fail_on_policy` switch (`giton/repo_config.py`).
|
|
85
|
+
- New CLI sub-app `giton policy` with `check`, `init`, `list` commands.
|
|
86
|
+
- Interactive helper `giton/interactive.py` (`confirm`, `choose`)
|
|
87
|
+
honouring `GITON_NON_INTERACTIVE` and TTY detection.
|
|
88
|
+
- `runner.run_trigger` now returns a `TriggerOutcome` carrying both
|
|
89
|
+
policy findings and plugin results; hooks fail when
|
|
90
|
+
`fail_on_policy` and any error is present.
|
|
91
|
+
- Tests: `tests/test_policies.py` covers all checks, repo-config
|
|
92
|
+
override semantics, and an end-to-end `run_trigger` flow.
|
|
93
|
+
|
|
94
|
+
### Changed
|
|
95
|
+
- `giton hook pre-commit` / `pre-push` now also evaluate built-in
|
|
96
|
+
policies; `post-commit` runs them advisory by default.
|
|
97
|
+
- Shell REPL gained `policy list|check|init` commands.
|
|
98
|
+
|
|
99
|
+
## [0.1.2] - 2026-05-27
|
|
100
|
+
|
|
101
|
+
### Docs
|
|
102
|
+
- Update CHANGELOG.md
|
|
103
|
+
- Update README.md
|
|
104
|
+
- Update TODO.md
|
|
105
|
+
|
|
106
|
+
### Test
|
|
107
|
+
- Update tests/test_basic.py
|
|
108
|
+
|
|
109
|
+
### Other
|
|
110
|
+
- Update .gitignore
|
|
111
|
+
- Update .koru/event-store.jsonl
|
|
112
|
+
- Update .koru/events/observability.jsonl
|
|
113
|
+
- Update .koru/history.jsonl
|
|
114
|
+
- Update .koru/onboarding.json
|
|
115
|
+
- Update .koru/project.json
|
|
116
|
+
- Update .planfile/.koru/autonomous-state.json
|
|
117
|
+
- Update .planfile/.koru/autonomy-telemetry.json
|
|
118
|
+
- Update .planfile/.koru/event-store.jsonl
|
|
119
|
+
- Update .planfile/.koru/nfo-events.jsonl
|
|
120
|
+
- ... and 9 more files
|
|
121
|
+
|
|
122
|
+
## [0.1.1] - 2026-05-27
|
|
123
|
+
|
|
124
|
+
### Docs
|
|
125
|
+
- Update README.md
|
|
126
|
+
|
|
127
|
+
### Test
|
|
128
|
+
- Update tests/__init__.py
|
|
129
|
+
- Update tests/test_basic.py
|
|
130
|
+
|
|
131
|
+
### Other
|
|
132
|
+
- Update .env.example
|
|
133
|
+
- Update .idea/.gitignore
|
|
134
|
+
- Update .idea/giton.iml
|
|
135
|
+
- Update .idea/inspectionProfiles/Project_Default.xml
|
|
136
|
+
- Update .idea/inspectionProfiles/profiles_settings.xml
|
|
137
|
+
- Update .idea/modules.xml
|
|
138
|
+
- Update .idea/pyProjectModel.xml
|
|
139
|
+
- Update .idea/vcs.xml
|
|
140
|
+
- Update uv.lock
|
|
141
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: giton
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: Local AI layer for git: orchestrates policies & plugins between commit and push.
|
|
5
5
|
Author: semcod
|
|
6
6
|
Author-email: Tom Sapletta <tom@sapletta.com>
|
|
@@ -22,11 +22,11 @@ Description-Content-Type: text/markdown
|
|
|
22
22
|
|
|
23
23
|
## AI Cost Tracking
|
|
24
24
|
|
|
25
|
-
    
|
|
26
|
+
  
|
|
27
27
|
|
|
28
|
-
- 🤖 **LLM usage:** $0.
|
|
29
|
-
- 👤 **Human dev:** ~$
|
|
28
|
+
- 🤖 **LLM usage:** $0.6123 (8 commits)
|
|
29
|
+
- 👤 **Human dev:** ~$318 (3.2h @ $100/h, 30min dedup)
|
|
30
30
|
|
|
31
31
|
Generated on 2026-05-27 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
|
|
32
32
|
|
|
@@ -45,7 +45,7 @@ What is still missing is one local operator that:
|
|
|
45
45
|
- cleans up history before `push`,
|
|
46
46
|
- integrates plugins via MCP/REST/CLI/gRPC.
|
|
47
47
|
|
|
48
|
-
## Proposed direction for `
|
|
48
|
+
## Proposed direction for `giton`
|
|
49
49
|
|
|
50
50
|
1. **Local-first with safe defaults**
|
|
51
51
|
- AI proposes changes, user approves them.
|
|
@@ -111,7 +111,7 @@ giton plugin install-category lang:python # install everything for a language
|
|
|
111
111
|
|
|
112
112
|
### Default plugins
|
|
113
113
|
|
|
114
|
-
The 3 plugins activated by `
|
|
114
|
+
The 3 plugins activated by `giton init` cover the most common
|
|
115
115
|
day-to-day needs in a `commit → push` loop:
|
|
116
116
|
|
|
117
117
|
| name | category | trigger | role |
|
|
@@ -145,6 +145,40 @@ giton> catalog
|
|
|
145
145
|
giton> install prefact
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
+
### Built-in policies
|
|
149
|
+
|
|
150
|
+
`giton` ships with a small zero-dependency policy engine that runs on
|
|
151
|
+
every hook trigger — even before any plugin is installed:
|
|
152
|
+
|
|
153
|
+
- **`conventional_commits`** — subject must match
|
|
154
|
+
`type(scope)?: subject` and stay within `max_subject_length`.
|
|
155
|
+
- **`no_wip_commits`** — blocks subjects matching `wip`, `tmp`, `xxx`, `fixme`.
|
|
156
|
+
- **`no_secrets`** — scans staged additions for AWS keys, private-key
|
|
157
|
+
headers and `api_key=`/`secret=` patterns.
|
|
158
|
+
- **`max_file_size`** — rejects staged files larger than `kb` (default 512 KB).
|
|
159
|
+
|
|
160
|
+
Inspect or customize them per repo:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
giton policy list # show active policies
|
|
164
|
+
giton policy check -t pre-commit # evaluate without running plugins
|
|
165
|
+
giton policy init # write .giton/config.yaml
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
`.giton/config.yaml` is a deep-merge over the defaults — disable a
|
|
169
|
+
single check or tweak `max_subject_length` without restating everything:
|
|
170
|
+
|
|
171
|
+
```yaml
|
|
172
|
+
policies:
|
|
173
|
+
no_wip_commits:
|
|
174
|
+
enabled: false
|
|
175
|
+
conventional_commits:
|
|
176
|
+
max_subject_length: 100
|
|
177
|
+
hooks:
|
|
178
|
+
post-commit:
|
|
179
|
+
fail_on_policy: true # turn advisory checks into blocking
|
|
180
|
+
```
|
|
181
|
+
|
|
148
182
|
### Plugin contract
|
|
149
183
|
|
|
150
184
|
A plugin is any executable command (CLI). The catalog entry declares its
|
|
@@ -156,6 +190,36 @@ Future exec types (`mcp`, `rest`) will share the same JSON in/out
|
|
|
156
190
|
contract: input = git context + policy findings, output = list of
|
|
157
191
|
proposed actions (patches, fixup commits, warnings).
|
|
158
192
|
|
|
193
|
+
## Examples
|
|
194
|
+
|
|
195
|
+
The `examples/` directory contains working demonstrations of giton:
|
|
196
|
+
|
|
197
|
+
- **[examples/basic](examples/basic/)** - Basic usage example showing how to use giton as a Python library to collect git context, run triggers, and handle policy findings and plugin results. Can be run directly or with pytest.
|
|
198
|
+
|
|
199
|
+
- **[examples/advanced](examples/advanced/)** - Advanced usage example demonstrating plugin management (add, remove, list), custom policy configuration, hook installation/uninstallation, and running multiple triggers in sequence.
|
|
200
|
+
|
|
201
|
+
- **[examples/testing](examples/testing/)** - Testing example with pytest integration and Docker support. Shows how to integrate giton into CI/CD pipelines with containerized testing environments. Includes Dockerfile and docker-compose.yml for easy setup.
|
|
202
|
+
|
|
203
|
+
### Running examples with Docker
|
|
204
|
+
|
|
205
|
+
All examples include Dockerfiles for containerized execution:
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# Basic example
|
|
209
|
+
docker build -f examples/basic/Dockerfile -t giton-example-basic .
|
|
210
|
+
docker run --rm -v $(pwd)/examples/basic/logs:/app/logs giton-example-basic
|
|
211
|
+
|
|
212
|
+
# Advanced example
|
|
213
|
+
docker build -f examples/advanced/Dockerfile -t giton-example-advanced .
|
|
214
|
+
docker run --rm -v $(pwd)/examples/advanced/logs:/app/logs giton-example-advanced
|
|
215
|
+
|
|
216
|
+
# Testing example
|
|
217
|
+
docker build -f examples/testing/Dockerfile -t giton-test .
|
|
218
|
+
docker run --rm -v $(pwd)/examples/testing/logs:/app/logs giton-test
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
See each example's README.md for detailed usage instructions.
|
|
222
|
+
|
|
159
223
|
|
|
160
224
|
## License
|
|
161
225
|
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
## AI Cost Tracking
|
|
5
5
|
|
|
6
|
-
    
|
|
7
|
+
  
|
|
8
8
|
|
|
9
|
-
- 🤖 **LLM usage:** $0.
|
|
10
|
-
- 👤 **Human dev:** ~$
|
|
9
|
+
- 🤖 **LLM usage:** $0.6123 (8 commits)
|
|
10
|
+
- 👤 **Human dev:** ~$318 (3.2h @ $100/h, 30min dedup)
|
|
11
11
|
|
|
12
12
|
Generated on 2026-05-27 using [openrouter/qwen/qwen3-coder-next](https://openrouter.ai/qwen/qwen3-coder-next)
|
|
13
13
|
|
|
@@ -26,7 +26,7 @@ What is still missing is one local operator that:
|
|
|
26
26
|
- cleans up history before `push`,
|
|
27
27
|
- integrates plugins via MCP/REST/CLI/gRPC.
|
|
28
28
|
|
|
29
|
-
## Proposed direction for `
|
|
29
|
+
## Proposed direction for `giton`
|
|
30
30
|
|
|
31
31
|
1. **Local-first with safe defaults**
|
|
32
32
|
- AI proposes changes, user approves them.
|
|
@@ -92,7 +92,7 @@ giton plugin install-category lang:python # install everything for a language
|
|
|
92
92
|
|
|
93
93
|
### Default plugins
|
|
94
94
|
|
|
95
|
-
The 3 plugins activated by `
|
|
95
|
+
The 3 plugins activated by `giton init` cover the most common
|
|
96
96
|
day-to-day needs in a `commit → push` loop:
|
|
97
97
|
|
|
98
98
|
| name | category | trigger | role |
|
|
@@ -126,6 +126,40 @@ giton> catalog
|
|
|
126
126
|
giton> install prefact
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
+
### Built-in policies
|
|
130
|
+
|
|
131
|
+
`giton` ships with a small zero-dependency policy engine that runs on
|
|
132
|
+
every hook trigger — even before any plugin is installed:
|
|
133
|
+
|
|
134
|
+
- **`conventional_commits`** — subject must match
|
|
135
|
+
`type(scope)?: subject` and stay within `max_subject_length`.
|
|
136
|
+
- **`no_wip_commits`** — blocks subjects matching `wip`, `tmp`, `xxx`, `fixme`.
|
|
137
|
+
- **`no_secrets`** — scans staged additions for AWS keys, private-key
|
|
138
|
+
headers and `api_key=`/`secret=` patterns.
|
|
139
|
+
- **`max_file_size`** — rejects staged files larger than `kb` (default 512 KB).
|
|
140
|
+
|
|
141
|
+
Inspect or customize them per repo:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
giton policy list # show active policies
|
|
145
|
+
giton policy check -t pre-commit # evaluate without running plugins
|
|
146
|
+
giton policy init # write .giton/config.yaml
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
`.giton/config.yaml` is a deep-merge over the defaults — disable a
|
|
150
|
+
single check or tweak `max_subject_length` without restating everything:
|
|
151
|
+
|
|
152
|
+
```yaml
|
|
153
|
+
policies:
|
|
154
|
+
no_wip_commits:
|
|
155
|
+
enabled: false
|
|
156
|
+
conventional_commits:
|
|
157
|
+
max_subject_length: 100
|
|
158
|
+
hooks:
|
|
159
|
+
post-commit:
|
|
160
|
+
fail_on_policy: true # turn advisory checks into blocking
|
|
161
|
+
```
|
|
162
|
+
|
|
129
163
|
### Plugin contract
|
|
130
164
|
|
|
131
165
|
A plugin is any executable command (CLI). The catalog entry declares its
|
|
@@ -137,6 +171,36 @@ Future exec types (`mcp`, `rest`) will share the same JSON in/out
|
|
|
137
171
|
contract: input = git context + policy findings, output = list of
|
|
138
172
|
proposed actions (patches, fixup commits, warnings).
|
|
139
173
|
|
|
174
|
+
## Examples
|
|
175
|
+
|
|
176
|
+
The `examples/` directory contains working demonstrations of giton:
|
|
177
|
+
|
|
178
|
+
- **[examples/basic](examples/basic/)** - Basic usage example showing how to use giton as a Python library to collect git context, run triggers, and handle policy findings and plugin results. Can be run directly or with pytest.
|
|
179
|
+
|
|
180
|
+
- **[examples/advanced](examples/advanced/)** - Advanced usage example demonstrating plugin management (add, remove, list), custom policy configuration, hook installation/uninstallation, and running multiple triggers in sequence.
|
|
181
|
+
|
|
182
|
+
- **[examples/testing](examples/testing/)** - Testing example with pytest integration and Docker support. Shows how to integrate giton into CI/CD pipelines with containerized testing environments. Includes Dockerfile and docker-compose.yml for easy setup.
|
|
183
|
+
|
|
184
|
+
### Running examples with Docker
|
|
185
|
+
|
|
186
|
+
All examples include Dockerfiles for containerized execution:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# Basic example
|
|
190
|
+
docker build -f examples/basic/Dockerfile -t giton-example-basic .
|
|
191
|
+
docker run --rm -v $(pwd)/examples/basic/logs:/app/logs giton-example-basic
|
|
192
|
+
|
|
193
|
+
# Advanced example
|
|
194
|
+
docker build -f examples/advanced/Dockerfile -t giton-example-advanced .
|
|
195
|
+
docker run --rm -v $(pwd)/examples/advanced/logs:/app/logs giton-example-advanced
|
|
196
|
+
|
|
197
|
+
# Testing example
|
|
198
|
+
docker build -f examples/testing/Dockerfile -t giton-test .
|
|
199
|
+
docker run --rm -v $(pwd)/examples/testing/logs:/app/logs giton-test
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
See each example's README.md for detailed usage instructions.
|
|
203
|
+
|
|
140
204
|
|
|
141
205
|
## License
|
|
142
206
|
|
giton-0.1.5/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.1.5
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
FROM python:3.13-slim
|
|
2
|
+
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
|
|
5
|
+
# Install system dependencies
|
|
6
|
+
RUN apt-get update && apt-get install -y \
|
|
7
|
+
git \
|
|
8
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
9
|
+
|
|
10
|
+
# Copy giton source from parent directory (build context is project root)
|
|
11
|
+
COPY ../../src/giton /app/src/giton
|
|
12
|
+
COPY ../../pyproject.toml /app/pyproject.toml
|
|
13
|
+
COPY ../../README.md /app/README.md
|
|
14
|
+
|
|
15
|
+
# Install giton and dependencies
|
|
16
|
+
RUN pip install --no-cache-dir -e .
|
|
17
|
+
|
|
18
|
+
# Install pytest and testing dependencies
|
|
19
|
+
RUN pip install --no-cache-dir pytest pytest-cov
|
|
20
|
+
|
|
21
|
+
# Copy example files
|
|
22
|
+
COPY examples/advanced/main.py /app/main.py
|
|
23
|
+
|
|
24
|
+
# Create log directory
|
|
25
|
+
RUN mkdir -p /app/logs
|
|
26
|
+
|
|
27
|
+
# Set up git repository
|
|
28
|
+
RUN git init && \
|
|
29
|
+
git config user.email "test@example.com" && \
|
|
30
|
+
git config user.name "Test User"
|
|
31
|
+
|
|
32
|
+
# Default command - run example and save logs
|
|
33
|
+
CMD bash -c "python main.py 2>&1 | tee /app/logs/log.txt"
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Advanced Giton Example
|
|
2
|
+
|
|
3
|
+
This example demonstrates advanced giton usage including:
|
|
4
|
+
- Custom policy configuration
|
|
5
|
+
- Plugin management
|
|
6
|
+
- Programmatic hook installation
|
|
7
|
+
- Interactive usage patterns
|
|
8
|
+
|
|
9
|
+
## Setup
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Install giton with dev dependencies
|
|
13
|
+
pip install giton[dev]
|
|
14
|
+
|
|
15
|
+
# Initialize giton
|
|
16
|
+
giton init
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Features Demonstrated
|
|
20
|
+
|
|
21
|
+
The `main.py` script shows:
|
|
22
|
+
- Loading and managing plugins
|
|
23
|
+
- Custom policy evaluation
|
|
24
|
+
- Installing/uninstalling git hooks
|
|
25
|
+
- Running multiple triggers in sequence
|
|
26
|
+
- Handling errors and edge cases
|
|
27
|
+
|
|
28
|
+
## Running the example
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
cd examples/advanced
|
|
32
|
+
python main.py
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Advanced Concepts
|
|
36
|
+
|
|
37
|
+
### Policy Configuration
|
|
38
|
+
Giton uses YAML-based policy files to define rules for:
|
|
39
|
+
- Commit message conventions
|
|
40
|
+
- Code quality standards
|
|
41
|
+
- Security checks
|
|
42
|
+
- Test coverage requirements
|
|
43
|
+
|
|
44
|
+
### Plugin System
|
|
45
|
+
Plugins can be:
|
|
46
|
+
- CLI tools (exec type)
|
|
47
|
+
- MCP servers
|
|
48
|
+
- REST APIs
|
|
49
|
+
- gRPC services
|
|
50
|
+
|
|
51
|
+
### Hook Integration
|
|
52
|
+
Giton installs git hooks that delegate to `giton hook <name>`:
|
|
53
|
+
- `pre-commit`: Run checks before committing
|
|
54
|
+
- `post-commit`: Analyze after commit
|
|
55
|
+
- `pre-push`: Final validation before pushing
|