cfgit 0.4.0__tar.gz → 0.4.1__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 (83) hide show
  1. {cfgit-0.4.0 → cfgit-0.4.1}/PKG-INFO +1 -1
  2. {cfgit-0.4.0 → cfgit-0.4.1}/plugins/cfg_impact/pyproject.toml +2 -2
  3. {cfgit-0.4.0 → cfgit-0.4.1}/pyproject.toml +1 -1
  4. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/cli/main.py +14 -2
  5. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_update_check.py +43 -0
  6. {cfgit-0.4.0 → cfgit-0.4.1}/.github/workflows/ci.yml +0 -0
  7. {cfgit-0.4.0 → cfgit-0.4.1}/.github/workflows/publish.yml +0 -0
  8. {cfgit-0.4.0 → cfgit-0.4.1}/.gitignore +0 -0
  9. {cfgit-0.4.0 → cfgit-0.4.1}/CONTRIBUTING.md +0 -0
  10. {cfgit-0.4.0 → cfgit-0.4.1}/CREDITS.md +0 -0
  11. {cfgit-0.4.0 → cfgit-0.4.1}/LICENSE +0 -0
  12. {cfgit-0.4.0 → cfgit-0.4.1}/NOTICE +0 -0
  13. {cfgit-0.4.0 → cfgit-0.4.1}/README.md +0 -0
  14. {cfgit-0.4.0 → cfgit-0.4.1}/SECURITY.md +0 -0
  15. {cfgit-0.4.0 → cfgit-0.4.1}/docs/ADAPTERS.md +0 -0
  16. {cfgit-0.4.0 → cfgit-0.4.1}/docs/AGENTS.md +0 -0
  17. {cfgit-0.4.0 → cfgit-0.4.1}/docs/BRANCHING_PLAN.md +0 -0
  18. {cfgit-0.4.0 → cfgit-0.4.1}/docs/CONFIGURATION.md +0 -0
  19. {cfgit-0.4.0 → cfgit-0.4.1}/docs/IDENTITY_AND_ATTRIBUTION.md +0 -0
  20. {cfgit-0.4.0 → cfgit-0.4.1}/docs/PUBLISHING.md +0 -0
  21. {cfgit-0.4.0 → cfgit-0.4.1}/docs/README.md +0 -0
  22. {cfgit-0.4.0 → cfgit-0.4.1}/docs/SPEC.md +0 -0
  23. {cfgit-0.4.0 → cfgit-0.4.1}/docs/SPEC_CORE.md +0 -0
  24. {cfgit-0.4.0 → cfgit-0.4.1}/docs/USAGE.md +0 -0
  25. {cfgit-0.4.0 → cfgit-0.4.1}/docs/screenshots/01-diff.png +0 -0
  26. {cfgit-0.4.0 → cfgit-0.4.1}/docs/screenshots/02-impact.png +0 -0
  27. {cfgit-0.4.0 → cfgit-0.4.1}/docs/screenshots/03-scoped-impact.png +0 -0
  28. {cfgit-0.4.0 → cfgit-0.4.1}/examples/.cfg.toml +0 -0
  29. {cfgit-0.4.0 → cfgit-0.4.1}/examples/cfgit-support-demo.toml +0 -0
  30. {cfgit-0.4.0 → cfgit-0.4.1}/examples/seed_support_demo.py +0 -0
  31. {cfgit-0.4.0 → cfgit-0.4.1}/plugins/cfg_impact/README.md +0 -0
  32. {cfgit-0.4.0 → cfgit-0.4.1}/plugins/cfg_impact/cfg_impact/__init__.py +0 -0
  33. {cfgit-0.4.0 → cfgit-0.4.1}/plugins/cfg_impact/cfg_impact/overview.py +0 -0
  34. {cfgit-0.4.0 → cfgit-0.4.1}/plugins/cfg_impact/cfg_impact/providers/__init__.py +0 -0
  35. {cfgit-0.4.0 → cfgit-0.4.1}/plugins/cfg_impact/cfg_impact/providers/base.py +0 -0
  36. {cfgit-0.4.0 → cfgit-0.4.1}/plugins/cfg_impact/cfg_impact/providers/claude.py +0 -0
  37. {cfgit-0.4.0 → cfgit-0.4.1}/plugins/cfg_impact/cfg_impact/providers/factory.py +0 -0
  38. {cfgit-0.4.0 → cfgit-0.4.1}/plugins/cfg_impact/cfg_impact/providers/gemini.py +0 -0
  39. {cfgit-0.4.0 → cfgit-0.4.1}/plugins/cfg_impact/cfg_impact/providers/openai_provider.py +0 -0
  40. {cfgit-0.4.0 → cfgit-0.4.1}/skills/cfgit/SKILL.md +0 -0
  41. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/__init__.py +0 -0
  42. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/adapters/__init__.py +0 -0
  43. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/adapters/base.py +0 -0
  44. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/adapters/mongo.py +0 -0
  45. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/adapters/postgres.py +0 -0
  46. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/approval/__init__.py +0 -0
  47. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/approval/base.py +0 -0
  48. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/cli/__init__.py +0 -0
  49. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/core/__init__.py +0 -0
  50. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/core/authz.py +0 -0
  51. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/core/config.py +0 -0
  52. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/core/diff.py +0 -0
  53. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/core/engine.py +0 -0
  54. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/core/hashing.py +0 -0
  55. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/core/identity.py +0 -0
  56. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/core/remedy.py +0 -0
  57. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/interfaces/__init__.py +0 -0
  58. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/interfaces/actions.py +0 -0
  59. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/mcp/__init__.py +0 -0
  60. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/mcp/server.py +0 -0
  61. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/ui/__init__.py +0 -0
  62. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/ui/server.py +0 -0
  63. {cfgit-0.4.0 → cfgit-0.4.1}/src/cfg/update.py +0 -0
  64. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_adapter_contract_live.py +0 -0
  65. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_authz.py +0 -0
  66. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_awareness.py +0 -0
  67. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_commit_dry_run.py +0 -0
  68. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_config.py +0 -0
  69. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_config_discovery.py +0 -0
  70. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_console_script.py +0 -0
  71. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_core_purity.py +0 -0
  72. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_engine_safety.py +0 -0
  73. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_export_import.py +0 -0
  74. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_hashing.py +0 -0
  75. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_identity.py +0 -0
  76. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_impact_boundary.py +0 -0
  77. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_mcp_identity.py +0 -0
  78. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_mongo_history.py +0 -0
  79. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_output_mode.py +0 -0
  80. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_postgres_history.py +0 -0
  81. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_remedy.py +0 -0
  82. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_set_fields.py +0 -0
  83. {cfgit-0.4.0 → cfgit-0.4.1}/tests/test_ui_server.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cfgit
3
- Version: 0.4.0
3
+ Version: 0.4.1
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
@@ -1,13 +1,13 @@
1
1
  [project]
2
2
  name = "cfgit-impact"
3
- version = "0.4.0"
3
+ version = "0.4.1"
4
4
  description = "Optional cfgit plugin for deterministic system-impact summaries and opt-in LLM narration of database record diffs"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
7
7
  license = "Apache-2.0"
8
8
  authors = [{ name = "Mohammad Ausaf" }]
9
9
  dependencies = [
10
- "cfgit>=0.4.0,<0.5.0",
10
+ "cfgit>=0.4.1,<0.5.0",
11
11
  "httpx>=0.27",
12
12
  ]
13
13
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "cfgit"
3
- version = "0.4.0"
3
+ version = "0.4.1"
4
4
  description = "Git-style history, diff, drift detection, and rollback for live database records without migrating or owning your datastore"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -72,9 +72,21 @@ def main(argv: list[str] | None = None) -> int:
72
72
  from cfg import update
73
73
 
74
74
  if args.snooze is not None:
75
- _emit(update.snooze(args.snooze), json_mode=args.json)
75
+ result = update.snooze(args.snooze)
76
+ if args.json:
77
+ _emit(result, json_mode=True)
78
+ else:
79
+ print(f"Update reminders snoozed for {result['days']} days.")
76
80
  return EXIT_OK
77
- _emit(update.check(force=True).to_json(), json_mode=args.json)
81
+ status = update.check(force=True)
82
+ if args.json:
83
+ _emit(status.to_json(), json_mode=True)
84
+ elif status.disabled:
85
+ print(f"Update check is disabled (CFGIT_NO_UPDATE_CHECK is set). Installed: {status.installed}.")
86
+ elif status.message:
87
+ print(status.message)
88
+ else:
89
+ print(f"cfgit {status.installed} is up to date.")
78
90
  return EXIT_OK
79
91
  try:
80
92
  project = load_config(args.config_file)
@@ -187,3 +187,46 @@ def test_cli_nudge_gating(monkeypatch, capsys, cmd, json_mode, isatty, expect_nu
187
187
  captured = capsys.readouterr()
188
188
  assert ("available" in captured.err) is expect_nudge
189
189
  assert captured.out == "" # the nudge must NEVER touch stdout, in any case
190
+
191
+
192
+ # --- `cfg check-update` renders human prose, not a JSON dump (regression) --------------------
193
+
194
+
195
+ def test_check_update_human_prints_sentence_not_json(monkeypatch, capsys):
196
+ """Up-to-date `cfg check-update` must print a readable line in human mode, not raw JSON."""
197
+ import types
198
+
199
+ monkeypatch.setattr(
200
+ update, "check",
201
+ lambda *a, **k: types.SimpleNamespace(
202
+ installed="0.4.0", disabled=False, message=None, to_json=lambda: {}
203
+ ),
204
+ )
205
+ from cfg.cli.main import main
206
+
207
+ rc = main(["check-update"]) # no --json; capsys is not a TTY → auto picks JSON... so force human
208
+ _ = capsys.readouterr()
209
+ # explicit human mode via env is the real contract:
210
+ monkeypatch.setenv("CFG_OUTPUT", "human")
211
+ main(["check-update"])
212
+ out = capsys.readouterr().out
213
+ assert rc == 0
214
+ assert "up to date" in out
215
+ assert not out.strip().startswith("{") # never a JSON dump
216
+
217
+
218
+ def test_check_update_json_is_structured(monkeypatch, capsys):
219
+ import types
220
+
221
+ monkeypatch.setattr(
222
+ update, "check",
223
+ lambda *a, **k: types.SimpleNamespace(
224
+ installed="0.4.0", disabled=False, message=None,
225
+ to_json=lambda: {"installed": "0.4.0", "update_available": False},
226
+ ),
227
+ )
228
+ from cfg.cli.main import main
229
+
230
+ main(["--json", "check-update"])
231
+ out = capsys.readouterr().out
232
+ assert '"installed"' in out and out.strip().startswith("{")
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
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