cfgit 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.
- {cfgit-0.1.0 → cfgit-0.1.2}/.gitignore +9 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/CREDITS.md +1 -1
- {cfgit-0.1.0 → cfgit-0.1.2}/PKG-INFO +70 -22
- {cfgit-0.1.0 → cfgit-0.1.2}/README.md +69 -21
- {cfgit-0.1.0 → cfgit-0.1.2}/docs/ADAPTERS.md +2 -2
- {cfgit-0.1.0 → cfgit-0.1.2}/docs/AGENTS.md +2 -2
- {cfgit-0.1.0 → cfgit-0.1.2}/docs/PUBLISHING.md +7 -7
- {cfgit-0.1.0 → cfgit-0.1.2}/docs/README.md +0 -8
- {cfgit-0.1.0 → cfgit-0.1.2}/docs/SPEC.md +2 -2
- {cfgit-0.1.0 → cfgit-0.1.2}/docs/SPEC_CORE.md +3 -3
- {cfgit-0.1.0 → cfgit-0.1.2}/docs/USAGE.md +4 -1
- cfgit-0.1.2/docs/screenshots/01-diff.png +0 -0
- cfgit-0.1.2/docs/screenshots/02-impact.png +0 -0
- cfgit-0.1.2/docs/screenshots/03-scoped-impact.png +0 -0
- cfgit-0.1.2/examples/cfgit-support-demo.toml +123 -0
- cfgit-0.1.2/examples/seed_support_demo.py +1111 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/plugins/cfg_impact/README.md +20 -1
- {cfgit-0.1.0 → cfgit-0.1.2}/plugins/cfg_impact/cfg_impact/overview.py +24 -6
- {cfgit-0.1.0 → cfgit-0.1.2}/plugins/cfg_impact/cfg_impact/providers/__init__.py +1 -1
- {cfgit-0.1.0 → cfgit-0.1.2}/plugins/cfg_impact/cfg_impact/providers/base.py +5 -5
- {cfgit-0.1.0 → cfgit-0.1.2}/plugins/cfg_impact/cfg_impact/providers/claude.py +1 -1
- {cfgit-0.1.0 → cfgit-0.1.2}/plugins/cfg_impact/cfg_impact/providers/factory.py +1 -1
- {cfgit-0.1.0 → cfgit-0.1.2}/plugins/cfg_impact/cfg_impact/providers/gemini.py +1 -1
- {cfgit-0.1.0 → cfgit-0.1.2}/plugins/cfg_impact/cfg_impact/providers/openai_provider.py +1 -1
- {cfgit-0.1.0 → cfgit-0.1.2}/plugins/cfg_impact/pyproject.toml +2 -2
- {cfgit-0.1.0 → cfgit-0.1.2}/pyproject.toml +1 -1
- {cfgit-0.1.0 → cfgit-0.1.2}/skills/cfgit/SKILL.md +2 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/core/engine.py +5 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/interfaces/actions.py +7 -1
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/mcp/server.py +17 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/ui/server.py +179 -42
- {cfgit-0.1.0 → cfgit-0.1.2}/tests/test_engine_safety.py +22 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/tests/test_impact_boundary.py +36 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/tests/test_mcp_identity.py +19 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/tests/test_ui_server.py +9 -0
- cfgit-0.1.0/docs/archive/spec-v0.1.md +0 -563
- cfgit-0.1.0/docs/project-notes/findings.md +0 -128
- cfgit-0.1.0/docs/project-notes/handoff.json +0 -107
- cfgit-0.1.0/docs/project-notes/handoff.md +0 -178
- cfgit-0.1.0/docs/project-notes/review-findings.md +0 -153
- cfgit-0.1.0/docs/screenshots/01-diff.png +0 -0
- cfgit-0.1.0/docs/screenshots/02-impact.png +0 -0
- cfgit-0.1.0/docs/screenshots/03-scoped-impact.png +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/.github/workflows/ci.yml +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/.github/workflows/publish.yml +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/CONTRIBUTING.md +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/LICENSE +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/NOTICE +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/SECURITY.md +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/docs/BRANCHING_PLAN.md +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/docs/CONFIGURATION.md +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/docs/IDENTITY_AND_ATTRIBUTION.md +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/examples/.cfg.toml +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/plugins/cfg_impact/cfg_impact/__init__.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/__init__.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/adapters/__init__.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/adapters/base.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/adapters/mongo.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/adapters/postgres.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/approval/__init__.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/approval/base.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/cli/__init__.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/cli/main.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/core/__init__.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/core/authz.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/core/config.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/core/diff.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/core/hashing.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/core/identity.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/interfaces/__init__.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/mcp/__init__.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/src/cfg/ui/__init__.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/tests/test_adapter_contract_live.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/tests/test_authz.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/tests/test_config.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/tests/test_console_script.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/tests/test_core_purity.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/tests/test_hashing.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/tests/test_identity.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/tests/test_mongo_history.py +0 -0
- {cfgit-0.1.0 → cfgit-0.1.2}/tests/test_postgres_history.py +0 -0
|
@@ -116,6 +116,15 @@ activemq-data/
|
|
|
116
116
|
.cfg/
|
|
117
117
|
/.cfg.toml
|
|
118
118
|
|
|
119
|
+
# Local project notes and recording drafts
|
|
120
|
+
docs/project-notes/
|
|
121
|
+
*.mp4
|
|
122
|
+
*.mov
|
|
123
|
+
*.webm
|
|
124
|
+
*.mkv
|
|
125
|
+
*.avi
|
|
126
|
+
*.m4v
|
|
127
|
+
|
|
119
128
|
# Local secrets and overrides
|
|
120
129
|
*.local
|
|
121
130
|
.streamlit/secrets.toml
|
|
@@ -33,5 +33,5 @@ cfgit's framing (`SPEC_CORE.md` §3) is defined by contrast with the "git for da
|
|
|
33
33
|
**Apache-2.0** (see `LICENSE`). Permissive + explicit patent grant, so the company
|
|
34
34
|
and others can adopt freely. Apache-2.0 can depend on MIT/Apache libraries; it
|
|
35
35
|
**cannot** link GPL-2.0 source into the core: a second reason the Git borrowing
|
|
36
|
-
stays concept-only. The optional `
|
|
36
|
+
stays concept-only. The optional `cfgit-impact` plugin keeps any model-provider SDK
|
|
37
37
|
out of the core package, so a differently-licensed SDK can't taint the core license.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cfgit
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Git-style history, diff, drift detection, and rollback for live database records without migrating or owning your datastore
|
|
5
5
|
Project-URL: Homepage, https://github.com/AusafMo/cfgit
|
|
6
6
|
Project-URL: Repository, https://github.com/AusafMo/cfgit
|
|
@@ -243,13 +243,13 @@ same database. Your scripts and admin tools can still write it. cfgit sits besid
|
|
|
243
243
|
the store, records what changed, and refuses to clobber changes it did not record.
|
|
244
244
|
|
|
245
245
|
<p align="center">
|
|
246
|
-
<img src="docs/screenshots/01-diff.png" alt="
|
|
247
|
-
<img src="docs/screenshots/02-impact.png" alt="
|
|
248
|
-
<img src="docs/screenshots/03-scoped-impact.png" alt="Scoped impact
|
|
246
|
+
<img src="docs/screenshots/01-diff.png" alt="Production-shaped support agent drift with collection stats, branch workflow controls, history, and line-aligned diff" width="32%" />
|
|
247
|
+
<img src="docs/screenshots/02-impact.png" alt="High-risk system-impact panel for a refund-resolution agent change with provider-backed LLM narration" width="32%" />
|
|
248
|
+
<img src="docs/screenshots/03-scoped-impact.png" alt="Scoped impact analysis with selected policy, eval, and rollout records plus provider-backed narration" width="32%" />
|
|
249
249
|
</p>
|
|
250
250
|
|
|
251
251
|
<p align="center">
|
|
252
|
-
<sub>
|
|
252
|
+
<sub>Production-shaped drift review · narrated whole-system impact · narrated impact scoped to selected policy, eval, and rollout records</sub>
|
|
253
253
|
</p>
|
|
254
254
|
|
|
255
255
|
## Why cfgit exists
|
|
@@ -336,25 +336,39 @@ system, or schema migration tool.
|
|
|
336
336
|
|
|
337
337
|
## Install
|
|
338
338
|
|
|
339
|
-
From
|
|
339
|
+
From PyPI:
|
|
340
|
+
|
|
341
|
+
- [`cfgit`](https://pypi.org/project/cfgit/)
|
|
342
|
+
- [`cfgit-impact`](https://pypi.org/project/cfgit-impact/) for optional impact narration
|
|
340
343
|
|
|
341
344
|
```bash
|
|
342
|
-
|
|
343
|
-
. .venv/bin/activate
|
|
344
|
-
pip install -e '.[mongo,postgres,mcp,dev]'
|
|
345
|
-
pip install -e plugins/cfg_impact
|
|
345
|
+
pip install 'cfgit[mongo,postgres,mcp]'
|
|
346
346
|
```
|
|
347
347
|
|
|
348
348
|
Minimal install for Mongo only:
|
|
349
349
|
|
|
350
350
|
```bash
|
|
351
|
-
pip install
|
|
351
|
+
pip install 'cfgit[mongo]'
|
|
352
352
|
```
|
|
353
353
|
|
|
354
354
|
Minimal install for Postgres only:
|
|
355
355
|
|
|
356
356
|
```bash
|
|
357
|
-
pip install
|
|
357
|
+
pip install 'cfgit[postgres]'
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
Optional impact plugin:
|
|
361
|
+
|
|
362
|
+
```bash
|
|
363
|
+
pip install cfgit-impact
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
If you use `pipx`, install cfgit first and inject the optional plugin into the
|
|
367
|
+
same isolated environment:
|
|
368
|
+
|
|
369
|
+
```bash
|
|
370
|
+
pipx install 'cfgit[mongo,postgres,mcp]'
|
|
371
|
+
pipx inject cfgit cfgit-impact
|
|
358
372
|
```
|
|
359
373
|
|
|
360
374
|
## Quick start
|
|
@@ -570,11 +584,14 @@ Refs:
|
|
|
570
584
|
|
|
571
585
|
`cfg ui` starts a localhost-only web UI over the same action layer as the CLI and
|
|
572
586
|
MCP server. It reads like a git client: a collection-and-record tree on the left,
|
|
573
|
-
a
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
587
|
+
a recent-activity rail before you select anything, per-record commit graphs, and
|
|
588
|
+
a line-aligned side-by-side diff that collapses unchanged context (expandable in
|
|
589
|
+
place) and keeps the field name pinned while you scroll. The recent activity view
|
|
590
|
+
surfaces live drift and the latest cfgit commits across all configured records,
|
|
591
|
+
so you can see what changed recently without opening records one by one. It can
|
|
592
|
+
run status, diff, impact, commit, branch draft commits, PR open and merge, log,
|
|
593
|
+
show, adopt, restore, tag, init, import, and fsck, and ships dark and light
|
|
594
|
+
themes.
|
|
578
595
|
|
|
579
596
|
By default it binds to `127.0.0.1:8765` and tries the next free ports if needed:
|
|
580
597
|
|
|
@@ -587,6 +604,39 @@ If you omit `--port`, cfgit will try the next free local ports. If you pass
|
|
|
587
604
|
`--port` explicitly, cfgit treats that port as intentional and fails if it is
|
|
588
605
|
already in use.
|
|
589
606
|
|
|
607
|
+
## Production-shaped UI demo
|
|
608
|
+
|
|
609
|
+
The repo includes a safe support-control-plane fixture for screenshots, demos,
|
|
610
|
+
and UI testing. It creates synthetic records only in the database you pass; use a
|
|
611
|
+
throwaway database name when you want the run contained.
|
|
612
|
+
|
|
613
|
+
```bash
|
|
614
|
+
python examples/seed_support_demo.py \
|
|
615
|
+
--uri 'mongodb://localhost:27017/?replicaSet=rs0' \
|
|
616
|
+
--db cfgit_ui_demo \
|
|
617
|
+
--reset
|
|
618
|
+
|
|
619
|
+
cfg --config-file examples/cfgit-support-demo.toml --env dev init
|
|
620
|
+
cfg --config-file examples/cfgit-support-demo.toml --env dev import --all -m "initial production-shaped demo import"
|
|
621
|
+
|
|
622
|
+
python examples/seed_support_demo.py \
|
|
623
|
+
--uri 'mongodb://localhost:27017/?replicaSet=rs0' \
|
|
624
|
+
--db cfgit_ui_demo \
|
|
625
|
+
--drift
|
|
626
|
+
|
|
627
|
+
cfg --config-file examples/cfgit-support-demo.toml --env dev status
|
|
628
|
+
cfg --config-file examples/cfgit-support-demo.toml --env dev ui
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
The base seed creates a realistic support-agent runtime surface: orchestrator
|
|
632
|
+
and specialist agent configs, model routing, policy rules, tool registry records,
|
|
633
|
+
routing policies, escalation policies, eval suites, rollout controls, and
|
|
634
|
+
knowledge-source allowlists. The `--drift` pass simulates admin-console edits to
|
|
635
|
+
refund automation, refund policy, routing confidence, eval gates, rollout
|
|
636
|
+
traffic, and a new loyalty-credit tool. That gives the UI useful drift, impact,
|
|
637
|
+
scoped impact, adopt, branch, PR, merge, and restore-history paths without using
|
|
638
|
+
proprietary data.
|
|
639
|
+
|
|
590
640
|
## MCP and agent usage
|
|
591
641
|
|
|
592
642
|
The MCP server exposes the same operations with a uniform envelope:
|
|
@@ -618,6 +668,7 @@ Tools include:
|
|
|
618
668
|
- `cfg_pr_show`
|
|
619
669
|
- `cfg_pr_close`
|
|
620
670
|
- `cfg_pr_merge`
|
|
671
|
+
- `cfg_recent_history`
|
|
621
672
|
- `cfg_log`
|
|
622
673
|
- `cfg_show`
|
|
623
674
|
- `cfg_adopt`
|
|
@@ -649,7 +700,7 @@ explains in plain language what the change does, what it ripples into, and how t
|
|
|
649
700
|
roll it back:
|
|
650
701
|
|
|
651
702
|
```bash
|
|
652
|
-
pip install -
|
|
703
|
+
pip install cfgit-impact
|
|
653
704
|
cfg impact agent_configs:agent_planner --llm --json
|
|
654
705
|
```
|
|
655
706
|
|
|
@@ -722,10 +773,7 @@ against a safe environment.
|
|
|
722
773
|
- [docs/AGENTS.md](docs/AGENTS.md): MCP, skill, and impact plugin usage
|
|
723
774
|
- [docs/SPEC_CORE.md](docs/SPEC_CORE.md): project framing and v1 scope
|
|
724
775
|
- [docs/SPEC.md](docs/SPEC.md): deeper engine reference
|
|
725
|
-
- [docs/README.md](docs/README.md): full documentation index
|
|
726
|
-
- [docs/project-notes/findings.md](docs/project-notes/findings.md): implementation findings from the origin build
|
|
727
|
-
- [docs/project-notes/handoff.md](docs/project-notes/handoff.md): archived handoff notes
|
|
728
|
-
- [docs/archive/spec-v0.1.md](docs/archive/spec-v0.1.md): original historical spec
|
|
776
|
+
- [docs/README.md](docs/README.md): full documentation index
|
|
729
777
|
|
|
730
778
|
## Development
|
|
731
779
|
|
|
@@ -10,13 +10,13 @@ same database. Your scripts and admin tools can still write it. cfgit sits besid
|
|
|
10
10
|
the store, records what changed, and refuses to clobber changes it did not record.
|
|
11
11
|
|
|
12
12
|
<p align="center">
|
|
13
|
-
<img src="docs/screenshots/01-diff.png" alt="
|
|
14
|
-
<img src="docs/screenshots/02-impact.png" alt="
|
|
15
|
-
<img src="docs/screenshots/03-scoped-impact.png" alt="Scoped impact
|
|
13
|
+
<img src="docs/screenshots/01-diff.png" alt="Production-shaped support agent drift with collection stats, branch workflow controls, history, and line-aligned diff" width="32%" />
|
|
14
|
+
<img src="docs/screenshots/02-impact.png" alt="High-risk system-impact panel for a refund-resolution agent change with provider-backed LLM narration" width="32%" />
|
|
15
|
+
<img src="docs/screenshots/03-scoped-impact.png" alt="Scoped impact analysis with selected policy, eval, and rollout records plus provider-backed narration" width="32%" />
|
|
16
16
|
</p>
|
|
17
17
|
|
|
18
18
|
<p align="center">
|
|
19
|
-
<sub>
|
|
19
|
+
<sub>Production-shaped drift review · narrated whole-system impact · narrated impact scoped to selected policy, eval, and rollout records</sub>
|
|
20
20
|
</p>
|
|
21
21
|
|
|
22
22
|
## Why cfgit exists
|
|
@@ -103,25 +103,39 @@ system, or schema migration tool.
|
|
|
103
103
|
|
|
104
104
|
## Install
|
|
105
105
|
|
|
106
|
-
From
|
|
106
|
+
From PyPI:
|
|
107
|
+
|
|
108
|
+
- [`cfgit`](https://pypi.org/project/cfgit/)
|
|
109
|
+
- [`cfgit-impact`](https://pypi.org/project/cfgit-impact/) for optional impact narration
|
|
107
110
|
|
|
108
111
|
```bash
|
|
109
|
-
|
|
110
|
-
. .venv/bin/activate
|
|
111
|
-
pip install -e '.[mongo,postgres,mcp,dev]'
|
|
112
|
-
pip install -e plugins/cfg_impact
|
|
112
|
+
pip install 'cfgit[mongo,postgres,mcp]'
|
|
113
113
|
```
|
|
114
114
|
|
|
115
115
|
Minimal install for Mongo only:
|
|
116
116
|
|
|
117
117
|
```bash
|
|
118
|
-
pip install
|
|
118
|
+
pip install 'cfgit[mongo]'
|
|
119
119
|
```
|
|
120
120
|
|
|
121
121
|
Minimal install for Postgres only:
|
|
122
122
|
|
|
123
123
|
```bash
|
|
124
|
-
pip install
|
|
124
|
+
pip install 'cfgit[postgres]'
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Optional impact plugin:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
pip install cfgit-impact
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
If you use `pipx`, install cfgit first and inject the optional plugin into the
|
|
134
|
+
same isolated environment:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
pipx install 'cfgit[mongo,postgres,mcp]'
|
|
138
|
+
pipx inject cfgit cfgit-impact
|
|
125
139
|
```
|
|
126
140
|
|
|
127
141
|
## Quick start
|
|
@@ -337,11 +351,14 @@ Refs:
|
|
|
337
351
|
|
|
338
352
|
`cfg ui` starts a localhost-only web UI over the same action layer as the CLI and
|
|
339
353
|
MCP server. It reads like a git client: a collection-and-record tree on the left,
|
|
340
|
-
a
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
354
|
+
a recent-activity rail before you select anything, per-record commit graphs, and
|
|
355
|
+
a line-aligned side-by-side diff that collapses unchanged context (expandable in
|
|
356
|
+
place) and keeps the field name pinned while you scroll. The recent activity view
|
|
357
|
+
surfaces live drift and the latest cfgit commits across all configured records,
|
|
358
|
+
so you can see what changed recently without opening records one by one. It can
|
|
359
|
+
run status, diff, impact, commit, branch draft commits, PR open and merge, log,
|
|
360
|
+
show, adopt, restore, tag, init, import, and fsck, and ships dark and light
|
|
361
|
+
themes.
|
|
345
362
|
|
|
346
363
|
By default it binds to `127.0.0.1:8765` and tries the next free ports if needed:
|
|
347
364
|
|
|
@@ -354,6 +371,39 @@ If you omit `--port`, cfgit will try the next free local ports. If you pass
|
|
|
354
371
|
`--port` explicitly, cfgit treats that port as intentional and fails if it is
|
|
355
372
|
already in use.
|
|
356
373
|
|
|
374
|
+
## Production-shaped UI demo
|
|
375
|
+
|
|
376
|
+
The repo includes a safe support-control-plane fixture for screenshots, demos,
|
|
377
|
+
and UI testing. It creates synthetic records only in the database you pass; use a
|
|
378
|
+
throwaway database name when you want the run contained.
|
|
379
|
+
|
|
380
|
+
```bash
|
|
381
|
+
python examples/seed_support_demo.py \
|
|
382
|
+
--uri 'mongodb://localhost:27017/?replicaSet=rs0' \
|
|
383
|
+
--db cfgit_ui_demo \
|
|
384
|
+
--reset
|
|
385
|
+
|
|
386
|
+
cfg --config-file examples/cfgit-support-demo.toml --env dev init
|
|
387
|
+
cfg --config-file examples/cfgit-support-demo.toml --env dev import --all -m "initial production-shaped demo import"
|
|
388
|
+
|
|
389
|
+
python examples/seed_support_demo.py \
|
|
390
|
+
--uri 'mongodb://localhost:27017/?replicaSet=rs0' \
|
|
391
|
+
--db cfgit_ui_demo \
|
|
392
|
+
--drift
|
|
393
|
+
|
|
394
|
+
cfg --config-file examples/cfgit-support-demo.toml --env dev status
|
|
395
|
+
cfg --config-file examples/cfgit-support-demo.toml --env dev ui
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
The base seed creates a realistic support-agent runtime surface: orchestrator
|
|
399
|
+
and specialist agent configs, model routing, policy rules, tool registry records,
|
|
400
|
+
routing policies, escalation policies, eval suites, rollout controls, and
|
|
401
|
+
knowledge-source allowlists. The `--drift` pass simulates admin-console edits to
|
|
402
|
+
refund automation, refund policy, routing confidence, eval gates, rollout
|
|
403
|
+
traffic, and a new loyalty-credit tool. That gives the UI useful drift, impact,
|
|
404
|
+
scoped impact, adopt, branch, PR, merge, and restore-history paths without using
|
|
405
|
+
proprietary data.
|
|
406
|
+
|
|
357
407
|
## MCP and agent usage
|
|
358
408
|
|
|
359
409
|
The MCP server exposes the same operations with a uniform envelope:
|
|
@@ -385,6 +435,7 @@ Tools include:
|
|
|
385
435
|
- `cfg_pr_show`
|
|
386
436
|
- `cfg_pr_close`
|
|
387
437
|
- `cfg_pr_merge`
|
|
438
|
+
- `cfg_recent_history`
|
|
388
439
|
- `cfg_log`
|
|
389
440
|
- `cfg_show`
|
|
390
441
|
- `cfg_adopt`
|
|
@@ -416,7 +467,7 @@ explains in plain language what the change does, what it ripples into, and how t
|
|
|
416
467
|
roll it back:
|
|
417
468
|
|
|
418
469
|
```bash
|
|
419
|
-
pip install -
|
|
470
|
+
pip install cfgit-impact
|
|
420
471
|
cfg impact agent_configs:agent_planner --llm --json
|
|
421
472
|
```
|
|
422
473
|
|
|
@@ -489,10 +540,7 @@ against a safe environment.
|
|
|
489
540
|
- [docs/AGENTS.md](docs/AGENTS.md): MCP, skill, and impact plugin usage
|
|
490
541
|
- [docs/SPEC_CORE.md](docs/SPEC_CORE.md): project framing and v1 scope
|
|
491
542
|
- [docs/SPEC.md](docs/SPEC.md): deeper engine reference
|
|
492
|
-
- [docs/README.md](docs/README.md): full documentation index
|
|
493
|
-
- [docs/project-notes/findings.md](docs/project-notes/findings.md): implementation findings from the origin build
|
|
494
|
-
- [docs/project-notes/handoff.md](docs/project-notes/handoff.md): archived handoff notes
|
|
495
|
-
- [docs/archive/spec-v0.1.md](docs/archive/spec-v0.1.md): original historical spec
|
|
543
|
+
- [docs/README.md](docs/README.md): full documentation index
|
|
496
544
|
|
|
497
545
|
## Development
|
|
498
546
|
|
|
@@ -8,7 +8,7 @@ details. Core owns hashing, history semantics, drift detection, and restore logi
|
|
|
8
8
|
Install:
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
pip install
|
|
11
|
+
pip install 'cfgit[mongo]'
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Configuration:
|
|
@@ -45,7 +45,7 @@ Mongo notes:
|
|
|
45
45
|
Install:
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
pip install
|
|
48
|
+
pip install 'cfgit[postgres]'
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
Configuration:
|
|
@@ -54,7 +54,7 @@ tokens through MCP unless that client/session is trusted for secrets.
|
|
|
54
54
|
Install the MCP extra:
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
pip install
|
|
57
|
+
pip install 'cfgit[mcp]'
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
Run:
|
|
@@ -120,7 +120,7 @@ as token/DB-principal based rather than author-string based.
|
|
|
120
120
|
Install:
|
|
121
121
|
|
|
122
122
|
```bash
|
|
123
|
-
pip install -
|
|
123
|
+
pip install cfgit-impact
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
Deterministic impact:
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Publishing
|
|
2
2
|
|
|
3
|
-
cfgit publishes two Python
|
|
3
|
+
cfgit publishes two Python distributions:
|
|
4
4
|
|
|
5
5
|
- `cfgit`: Git-style history, diff, drift detection, branch/PR review, and
|
|
6
6
|
rollback for live database records without migrating or owning the datastore.
|
|
7
7
|
- `cfgit-impact`: optional plugin for deterministic system-impact summaries and
|
|
8
8
|
opt-in LLM narration of database record diffs.
|
|
9
9
|
|
|
10
|
-
Current
|
|
10
|
+
Current release version: `0.1.2`.
|
|
11
11
|
|
|
12
12
|
## One-Time PyPI Setup
|
|
13
13
|
|
|
@@ -49,8 +49,8 @@ python -m twine check dist/*
|
|
|
49
49
|
```bash
|
|
50
50
|
python -m venv /tmp/cfgit-publish-smoke
|
|
51
51
|
/tmp/cfgit-publish-smoke/bin/python -m pip install \
|
|
52
|
-
'dist/cfgit-0.1.
|
|
53
|
-
plugins/cfg_impact/dist/cfgit_impact-0.1.
|
|
52
|
+
'dist/cfgit-0.1.2-py3-none-any.whl[mcp]' \
|
|
53
|
+
plugins/cfg_impact/dist/cfgit_impact-0.1.2-py3-none-any.whl
|
|
54
54
|
/tmp/cfgit-publish-smoke/bin/cfg --help
|
|
55
55
|
/tmp/cfgit-publish-smoke/bin/python -c 'import cfg; import cfg.mcp.server; import cfg_impact; print("imports ok")'
|
|
56
56
|
```
|
|
@@ -63,9 +63,9 @@ release from a tag:
|
|
|
63
63
|
```bash
|
|
64
64
|
git checkout main
|
|
65
65
|
git pull origin main
|
|
66
|
-
git tag v0.1.
|
|
67
|
-
git push origin v0.1.
|
|
68
|
-
gh release create v0.1.
|
|
66
|
+
git tag v0.1.2
|
|
67
|
+
git push origin v0.1.2
|
|
68
|
+
gh release create v0.1.2 --title "v0.1.2" --notes "cfgit 0.1.2 package release."
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
The release triggers `.github/workflows/publish.yml`, which publishes `cfgit`
|
|
@@ -12,11 +12,3 @@ Technical references:
|
|
|
12
12
|
|
|
13
13
|
- [Core spec](SPEC_CORE.md): framing and v1 scope.
|
|
14
14
|
- [Engine spec](SPEC.md): detailed engine and adapter reference.
|
|
15
|
-
|
|
16
|
-
Project notes and historical artifacts:
|
|
17
|
-
|
|
18
|
-
- [Implementation findings](project-notes/findings.md): source-code and data-shape findings from the origin implementation.
|
|
19
|
-
- [Review findings](project-notes/review-findings.md): implementation audit defects and fix order.
|
|
20
|
-
- [Session handoff](project-notes/handoff.md): archived implementation handoff.
|
|
21
|
-
- [Session handoff JSON](project-notes/handoff.json): machine-readable handoff archive.
|
|
22
|
-
- [Original v0.1 spec](archive/spec-v0.1.md): early historical spec.
|
|
@@ -561,7 +561,7 @@ commit.pre_hook = "impact" # on commit: print the report; WARN only (nev
|
|
|
561
561
|
- The **graph extraction in §7.2 and the deterministic severity in §7.3C run locally with NO LLM**: only the natural-language *nature* classification (A) and the *why* narration (B/C) call a model. So even with the LLM fully disabled, `cfg impact` still reports blast radius, downstream consumers, cross-config conflicts, and orphan references (structural facts): you lose only the prose, not the consequence detection. **[V3.1-6] Severity (§7.3C) is keyed SOLELY off the LOCAL structural detection** (e.g. a `phase_contract` edge-field diff with ≥1 declared consumer ⇒ `breaking`); the LLM's nature label (A) is descriptive prose and is NEVER an input to severity: so severity is deterministic and reproducible even if the model is off or its prose varies. The LLM is the explainer, not the detector.
|
|
562
562
|
|
|
563
563
|
### 7.6 Implementation
|
|
564
|
-
- Shipped as a `
|
|
564
|
+
- Shipped as a `cfgit-impact` plugin; **core has zero LLM dependency** (§1 boundary holds). The plugin provides the model client + the edge-extractors; the manifest (`[impact]`) wires field→edge semantics per project.
|
|
565
565
|
- Provider-agnostic (Claude/OpenAI/local); default Claude. No model SDK in core.
|
|
566
566
|
|
|
567
567
|
---
|
|
@@ -805,7 +805,7 @@ Shipped as `CREDITS.md` + `NOTICE` + `LICENSE` in the repo; summarized here so t
|
|
|
805
805
|
- **Semantic/behavioral-diff prior art** for §7: *llm-prompt-semantic-diff* (embedding-% CLI), *llm-behavior-diff* (model-execution + severity + MCP server), and the *"Prompting in the Wild"* method (arXiv:2412.17298, CoT read-old+new→find-changes→flag-inconsistency, which §7 adopts for the intra-config `self_inconsistency` dimension). **Obligation: cite the methods/papers; check each repo's LICENSE before reusing any code** (most are permissive MIT/Apache, but verify per-repo at vendor time; until then we reuse only *ideas*, which needs citation, not license grant). → credit + per-repo license note in `CREDITS.md`.
|
|
806
806
|
- **Standard building blocks** (sha256/canonical-JSON hashing à la git blob; bitemporal modeling from the data-warehousing literature; optimistic-concurrency/CAS) are **public concepts / common knowledge**: credited as influences, no license obligation.
|
|
807
807
|
|
|
808
|
-
**`cfg`'s own license:** target **Apache-2.0** (permissive + explicit patent grant; lets the company and others adopt freely). Apache-2.0 is compatible with depending on MIT/Apache libraries; it is NOT compatible with *linking* GPL-2.0 code into the core: which is the second reason the Git borrowing stays concept-only. The optional `
|
|
808
|
+
**`cfg`'s own license:** target **Apache-2.0** (permissive + explicit patent grant; lets the company and others adopt freely). Apache-2.0 is compatible with depending on MIT/Apache libraries; it is NOT compatible with *linking* GPL-2.0 code into the core: which is the second reason the Git borrowing stays concept-only. The optional `cfgit-impact` plugin keeps any provider SDK out of core, so a differently-licensed model SDK can't taint the core license.
|
|
809
809
|
|
|
810
810
|
**Process rule (so future borrowing stays honest):** whenever code or a non-obvious design is taken from an external project, add a `CREDITS.md` row (project, what was taken, its license, idea-vs-code) in the SAME change: actually open and read that project's LICENSE before reuse, and isolate anything copyleft. This is itself a `cfg` repo convention, enforced in review.
|
|
811
811
|
|
|
@@ -142,7 +142,7 @@ Commands and surfaces (CLI + `--json`, localhost UI, MCP), each across **all con
|
|
|
142
142
|
- `cfg tag <name>`: bookmark the current state of everything to return to by name.
|
|
143
143
|
- `cfg adopt <record>` / `cfg adopt --all`: fold an out-of-band change into history with attribution (the reconciliation core). Cron-friendly.
|
|
144
144
|
- `cfg fsck`: integrity + drift sweep.
|
|
145
|
-
- `cfg impact <record> [a] [b]`: deterministic system-impact overview, with optional LLM narration from the `
|
|
145
|
+
- `cfg impact <record> [a] [b]`: deterministic system-impact overview, with optional LLM narration from the `cfgit-impact` plugin.
|
|
146
146
|
- `cfg identity-hash`: hash a private human token for authenticated identity config without storing the raw token.
|
|
147
147
|
- `cfg ui`: local web UI for the same operations.
|
|
148
148
|
- `cfg-mcp`: MCP server exposing the same operation envelope to agents.
|
|
@@ -189,7 +189,7 @@ writers = ["alice@*", "bob@*", "carol@*"]
|
|
|
189
189
|
admin_actions = ["init", "restore_system"]
|
|
190
190
|
```
|
|
191
191
|
|
|
192
|
-
> **First-task gate
|
|
192
|
+
> **First-task gate for any real deployment:** before tracking a collection, pin the stable id field and live-record rule against actual data. If multiple rows or documents can share the apparent id, configure a different id field or an explicit `live_when` selector before importing history. Getting this wrong makes the tool wrong on day one.
|
|
193
193
|
|
|
194
194
|
---
|
|
195
195
|
|
|
@@ -207,4 +207,4 @@ admin_actions = ["init", "restore_system"]
|
|
|
207
207
|
|
|
208
208
|
**v1 implementation correction:** `oid` is a content hash, not a unique entry id. A restore can intentionally create a new history entry whose document content equals an older version, so `(env, collection, record_id, oid)` must be a non-unique lookup index. The unique history key is `(env, collection, record_id, seq)`. HEAD stores both `head_oid` for dirty checks and `head_seq` for exact entry resolution. Any older SPEC.md wording that says `(config_id, oid)` is unique is superseded for v1.
|
|
209
209
|
|
|
210
|
-
**Build order for v1:** core engine + history schema + hashing + drift detect + mutation permissions → MongoAdapter → `init`/`status`/`diff`/`commit`/`log`/`adopt` → `restore` (single + system) + `tag` + `fsck` → PostgresAdapter (proves the seam) → localhost UI + MCP/skill over the same action layer → `
|
|
210
|
+
**Build order for v1:** core engine + history schema + hashing + drift detect + mutation permissions → MongoAdapter → `init`/`status`/`diff`/`commit`/`log`/`adopt` → `restore` (single + system) + `tag` + `fsck` → PostgresAdapter (proves the seam) → localhost UI + MCP/skill over the same action layer → `cfgit-impact` plugin boundary → point at the two origin collections and run the one-week usage test. Hosted product surfaces wait for signal.
|
|
@@ -269,7 +269,10 @@ cfg ui
|
|
|
269
269
|
```
|
|
270
270
|
|
|
271
271
|
The UI binds to `127.0.0.1`. It is a local operator surface over the same action
|
|
272
|
-
layer as the CLI and MCP server.
|
|
272
|
+
layer as the CLI and MCP server. Before a record is selected, the middle rail
|
|
273
|
+
shows recent activity across all configured records: current live drift plus the
|
|
274
|
+
latest cfgit history entries. Selecting one of those entries opens that record's
|
|
275
|
+
normal history and diff view.
|
|
273
276
|
|
|
274
277
|
## JSON mode
|
|
275
278
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "cfgit-support-demo"
|
|
3
|
+
|
|
4
|
+
[history]
|
|
5
|
+
history_collection = "cfgit_demo_history"
|
|
6
|
+
heads_collection = "cfgit_demo_heads"
|
|
7
|
+
|
|
8
|
+
[branches]
|
|
9
|
+
enabled = true
|
|
10
|
+
refs_collection = "cfgit_demo_refs"
|
|
11
|
+
default_branch = "main"
|
|
12
|
+
|
|
13
|
+
[[collection]]
|
|
14
|
+
name = "agent_configs"
|
|
15
|
+
id_field = "config_id"
|
|
16
|
+
live_when = { is_active = true }
|
|
17
|
+
ignore_fields = ["_id", "is_active", "updated_at", "updated_by"]
|
|
18
|
+
secret_fields = []
|
|
19
|
+
|
|
20
|
+
[[collection]]
|
|
21
|
+
name = "modelgarden_models"
|
|
22
|
+
id_field = "model_path"
|
|
23
|
+
live_when = {}
|
|
24
|
+
ignore_fields = ["_id", "updated_at", "updated_by"]
|
|
25
|
+
secret_fields = ["provider_config.api_key"]
|
|
26
|
+
|
|
27
|
+
[[collection]]
|
|
28
|
+
name = "policy_rules"
|
|
29
|
+
id_field = "rule_id"
|
|
30
|
+
live_when = { active = true }
|
|
31
|
+
ignore_fields = ["_id", "active", "updated_at", "updated_by"]
|
|
32
|
+
secret_fields = []
|
|
33
|
+
|
|
34
|
+
[[collection]]
|
|
35
|
+
name = "tool_registry"
|
|
36
|
+
id_field = "tool_id"
|
|
37
|
+
live_when = { enabled = true }
|
|
38
|
+
ignore_fields = ["_id", "enabled", "updated_at", "updated_by"]
|
|
39
|
+
secret_fields = ["credentials.api_key_ref", "oauth.client_secret_ref"]
|
|
40
|
+
|
|
41
|
+
[[collection]]
|
|
42
|
+
name = "routing_policies"
|
|
43
|
+
id_field = "policy_id"
|
|
44
|
+
live_when = { active = true }
|
|
45
|
+
ignore_fields = ["_id", "active", "updated_at", "updated_by"]
|
|
46
|
+
secret_fields = []
|
|
47
|
+
|
|
48
|
+
[[collection]]
|
|
49
|
+
name = "escalation_policies"
|
|
50
|
+
id_field = "escalation_id"
|
|
51
|
+
live_when = { active = true }
|
|
52
|
+
ignore_fields = ["_id", "active", "updated_at", "updated_by"]
|
|
53
|
+
secret_fields = []
|
|
54
|
+
|
|
55
|
+
[[collection]]
|
|
56
|
+
name = "eval_suites"
|
|
57
|
+
id_field = "suite_id"
|
|
58
|
+
live_when = { enabled = true }
|
|
59
|
+
ignore_fields = ["_id", "enabled", "updated_at", "updated_by"]
|
|
60
|
+
secret_fields = []
|
|
61
|
+
|
|
62
|
+
[[collection]]
|
|
63
|
+
name = "rollout_controls"
|
|
64
|
+
id_field = "rollout_id"
|
|
65
|
+
live_when = { enabled = true }
|
|
66
|
+
ignore_fields = ["_id", "enabled", "updated_at", "updated_by"]
|
|
67
|
+
secret_fields = []
|
|
68
|
+
|
|
69
|
+
[[collection]]
|
|
70
|
+
name = "knowledge_sources"
|
|
71
|
+
id_field = "source_id"
|
|
72
|
+
live_when = { enabled = true }
|
|
73
|
+
ignore_fields = ["_id", "enabled", "updated_at", "updated_by"]
|
|
74
|
+
secret_fields = []
|
|
75
|
+
|
|
76
|
+
[secrets]
|
|
77
|
+
block_fields = ["*_key", "*_secret", "*_token", "*api_key*", "*password*"]
|
|
78
|
+
block_values = ["sk-[A-Za-z0-9]{20,}", "AKIA[0-9A-Z]{16}"]
|
|
79
|
+
on_match = "refuse"
|
|
80
|
+
|
|
81
|
+
[author]
|
|
82
|
+
from = "git"
|
|
83
|
+
|
|
84
|
+
[connections]
|
|
85
|
+
enabled = true
|
|
86
|
+
share_with_ai = []
|
|
87
|
+
ai_provider = "openai"
|
|
88
|
+
warn_level = "none"
|
|
89
|
+
links = [
|
|
90
|
+
{ field = "agent", means = "agent identifier" },
|
|
91
|
+
{ field = "agents", means = "agent identifiers" },
|
|
92
|
+
{ field = "applies_to", means = "policy-to-agent linkage" },
|
|
93
|
+
{ field = "approval_policy", means = "human approval requirement" },
|
|
94
|
+
{ field = "audience", means = "customer or segment targeting" },
|
|
95
|
+
{ field = "escalation_policy", means = "human handoff policy" },
|
|
96
|
+
{ field = "eval_suite", means = "quality gate for a config" },
|
|
97
|
+
{ field = "fallback_models", means = "fallback model routing" },
|
|
98
|
+
{ field = "guarded_by", means = "policy or guardrail dependency" },
|
|
99
|
+
{ field = "handoffs", means = "agent handoff graph" },
|
|
100
|
+
{ field = "knowledge_sources", means = "retrieval source allowlist" },
|
|
101
|
+
{ field = "model", means = "model routing" },
|
|
102
|
+
{ field = "model_path", means = "model identifier" },
|
|
103
|
+
{ field = "policy_refs", means = "referenced policy rules" },
|
|
104
|
+
{ field = "routing_policy", means = "orchestration routing policy" },
|
|
105
|
+
{ field = "rollout_id", means = "rollout gate" },
|
|
106
|
+
{ field = "tool_id", means = "tool identifier" },
|
|
107
|
+
{ field = "tools", means = "shared tool list" },
|
|
108
|
+
]
|
|
109
|
+
|
|
110
|
+
[env.dev]
|
|
111
|
+
database = "mongo"
|
|
112
|
+
uri = "mongodb://localhost:27017/?replicaSet=rs0"
|
|
113
|
+
db = "cfgit_ui_demo"
|
|
114
|
+
needs_approval = false
|
|
115
|
+
|
|
116
|
+
[env.dev.identity]
|
|
117
|
+
mode = "open"
|
|
118
|
+
|
|
119
|
+
[env.dev.permissions]
|
|
120
|
+
mode = "open"
|
|
121
|
+
admins = []
|
|
122
|
+
writers = []
|
|
123
|
+
admin_actions = ["restore_system"]
|