codex-core 0.2.1__tar.gz → 0.3.0__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 (87) hide show
  1. {codex_core-0.2.1 → codex_core-0.3.0}/.github/workflows/ci.yml +3 -3
  2. {codex_core-0.2.1 → codex_core-0.3.0}/CHANGELOG.md +24 -0
  3. {codex_core-0.2.1 → codex_core-0.3.0}/PKG-INFO +1 -1
  4. {codex_core-0.2.1 → codex_core-0.3.0}/docs/en/architecture/platform/dev.md +39 -9
  5. {codex_core-0.2.1 → codex_core-0.3.0}/docs/ru/architecture/platform/dev.md +39 -9
  6. {codex_core-0.2.1 → codex_core-0.3.0}/pyproject.toml +9 -0
  7. codex_core-0.3.0/src/codex_core/dev/check_runner.py +544 -0
  8. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/dev/static_compiler/compiler.py +12 -5
  9. codex_core-0.3.0/src/codex_core/dev/static_compiler/js.py +226 -0
  10. codex_core-0.3.0/tests/unit/dev/__init__.py +1 -0
  11. codex_core-0.3.0/tests/unit/dev/test_check_runner.py +94 -0
  12. codex_core-0.3.0/tests/unit/dev/test_static_compiler.py +174 -0
  13. {codex_core-0.2.1 → codex_core-0.3.0}/tools/dev/README.md +2 -9
  14. codex_core-0.3.0/tools/dev/check.py +13 -0
  15. codex_core-0.2.1/src/codex_core/dev/check_runner.py +0 -276
  16. codex_core-0.2.1/src/codex_core/dev/static_compiler/js.py +0 -56
  17. codex_core-0.2.1/tools/dev/check.py +0 -22
  18. {codex_core-0.2.1 → codex_core-0.3.0}/.github/workflows/docs.yml +0 -0
  19. {codex_core-0.2.1 → codex_core-0.3.0}/.github/workflows/publish.yml +0 -0
  20. {codex_core-0.2.1 → codex_core-0.3.0}/.gitignore +0 -0
  21. {codex_core-0.2.1 → codex_core-0.3.0}/.pre-commit-config.yaml +0 -0
  22. {codex_core-0.2.1 → codex_core-0.3.0}/.python-version +0 -0
  23. {codex_core-0.2.1 → codex_core-0.3.0}/README.md +0 -0
  24. {codex_core-0.2.1 → codex_core-0.3.0}/docs/changelog.md +0 -0
  25. {codex_core-0.2.1 → codex_core-0.3.0}/docs/en/README.md +0 -0
  26. {codex_core-0.2.1 → codex_core-0.3.0}/docs/en/api/common.md +0 -0
  27. {codex_core-0.2.1 → codex_core-0.3.0}/docs/en/api/core.md +0 -0
  28. {codex_core-0.2.1 → codex_core-0.3.0}/docs/en/api/dev/check_runner.md +0 -0
  29. {codex_core-0.2.1 → codex_core-0.3.0}/docs/en/api/dev/index.md +0 -0
  30. {codex_core-0.2.1 → codex_core-0.3.0}/docs/en/api/dev/project_tree.md +0 -0
  31. {codex_core-0.2.1 → codex_core-0.3.0}/docs/en/api/dev/static_compiler.md +0 -0
  32. {codex_core-0.2.1 → codex_core-0.3.0}/docs/en/api/index.md +0 -0
  33. {codex_core-0.2.1 → codex_core-0.3.0}/docs/en/api/settings.md +0 -0
  34. {codex_core-0.2.1 → codex_core-0.3.0}/docs/en/architecture/README.md +0 -0
  35. {codex_core-0.2.1 → codex_core-0.3.0}/docs/en/architecture/platform/common.md +0 -0
  36. {codex_core-0.2.1 → codex_core-0.3.0}/docs/en/architecture/platform/core.md +0 -0
  37. {codex_core-0.2.1 → codex_core-0.3.0}/docs/en/architecture/platform/settings.md +0 -0
  38. {codex_core-0.2.1 → codex_core-0.3.0}/docs/en/tasks/getting_started.md +0 -0
  39. {codex_core-0.2.1 → codex_core-0.3.0}/docs/evolution/roadmap.md +0 -0
  40. {codex_core-0.2.1 → codex_core-0.3.0}/docs/index.md +0 -0
  41. {codex_core-0.2.1 → codex_core-0.3.0}/docs/planning/python_version_policy.md +0 -0
  42. {codex_core-0.2.1 → codex_core-0.3.0}/docs/ru/README.md +0 -0
  43. {codex_core-0.2.1 → codex_core-0.3.0}/docs/ru/architecture/README.md +0 -0
  44. {codex_core-0.2.1 → codex_core-0.3.0}/docs/ru/architecture/platform/common.md +0 -0
  45. {codex_core-0.2.1 → codex_core-0.3.0}/docs/ru/architecture/platform/core.md +0 -0
  46. {codex_core-0.2.1 → codex_core-0.3.0}/docs/ru/architecture/platform/settings.md +0 -0
  47. {codex_core-0.2.1 → codex_core-0.3.0}/docs/ru/tasks/getting_started.md +0 -0
  48. {codex_core-0.2.1 → codex_core-0.3.0}/docs/stylesheets/extra.css +0 -0
  49. {codex_core-0.2.1 → codex_core-0.3.0}/mkdocs.yml +0 -0
  50. {codex_core-0.2.1 → codex_core-0.3.0}/project_structure.txt +0 -0
  51. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/__init__.py +0 -0
  52. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/common/__init__.py +0 -0
  53. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/common/log_context.py +0 -0
  54. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/common/loguru_setup.py +0 -0
  55. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/common/phone.py +0 -0
  56. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/common/text.py +0 -0
  57. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/core/__init__.py +0 -0
  58. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/core/base_dto.py +0 -0
  59. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/core/exceptions.py +0 -0
  60. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/core/pii.py +0 -0
  61. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/dev/__init__.py +0 -0
  62. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/dev/project_tree.py +0 -0
  63. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/dev/static_compiler/__init__.py +0 -0
  64. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/dev/static_compiler/css.py +0 -0
  65. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/py.typed +0 -0
  66. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/settings/__init__.py +0 -0
  67. {codex_core-0.2.1 → codex_core-0.3.0}/src/codex_core/settings/base.py +0 -0
  68. {codex_core-0.2.1 → codex_core-0.3.0}/tests/conftest.py +0 -0
  69. {codex_core-0.2.1 → codex_core-0.3.0}/tests/integration/__init__.py +0 -0
  70. {codex_core-0.2.1 → codex_core-0.3.0}/tests/integration/conftest.py +0 -0
  71. {codex_core-0.2.1 → codex_core-0.3.0}/tests/integration/test_settings_integration.py +0 -0
  72. {codex_core-0.2.1 → codex_core-0.3.0}/tests/unit/__init__.py +0 -0
  73. {codex_core-0.2.1 → codex_core-0.3.0}/tests/unit/common/__init__.py +0 -0
  74. {codex_core-0.2.1 → codex_core-0.3.0}/tests/unit/common/test_log_context.py +0 -0
  75. {codex_core-0.2.1 → codex_core-0.3.0}/tests/unit/common/test_loguru_setup.py +0 -0
  76. {codex_core-0.2.1 → codex_core-0.3.0}/tests/unit/common/test_phone.py +0 -0
  77. {codex_core-0.2.1 → codex_core-0.3.0}/tests/unit/common/test_text.py +0 -0
  78. {codex_core-0.2.1 → codex_core-0.3.0}/tests/unit/conftest.py +0 -0
  79. {codex_core-0.2.1 → codex_core-0.3.0}/tests/unit/core/__init__.py +0 -0
  80. {codex_core-0.2.1 → codex_core-0.3.0}/tests/unit/core/test_exceptions.py +0 -0
  81. {codex_core-0.2.1 → codex_core-0.3.0}/tests/unit/core/test_pii.py +0 -0
  82. {codex_core-0.2.1 → codex_core-0.3.0}/tests/unit/settings/__init__.py +0 -0
  83. {codex_core-0.2.1 → codex_core-0.3.0}/tests/unit/settings/test_settings.py +0 -0
  84. {codex_core-0.2.1 → codex_core-0.3.0}/tools/__init__.py +0 -0
  85. {codex_core-0.2.1 → codex_core-0.3.0}/tools/dev/__init__.py +0 -0
  86. {codex_core-0.2.1 → codex_core-0.3.0}/tools/dev/generate_project_tree.py +0 -0
  87. {codex_core-0.2.1 → codex_core-0.3.0}/uv.lock +0 -0
@@ -27,13 +27,13 @@ jobs:
27
27
  run: uv sync --locked --extra dev
28
28
 
29
29
  - name: Run pre-commit
30
- run: uv run pre-commit run --all-files
30
+ run: uv run python tools/dev/check.py --lint
31
31
 
32
32
  - name: Run pip-audit
33
- run: uv run pip-audit
33
+ run: uv run python tools/dev/check.py --security
34
34
 
35
35
  - name: Run mypy
36
- run: uv run mypy src/codex_core/
36
+ run: uv run python tools/dev/check.py --types
37
37
 
38
38
  unit-tests:
39
39
  name: Unit Tests (Python ${{ matrix.python-version }})
@@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.0] - 2026-04-04
9
+
10
+ ### Added
11
+
12
+ - **Quality Gate**: Declarative configuration support via `pyproject.toml` (`[tool.codex-check]`).
13
+ - **Static Compiler**: Dependency-graph strategy for JS bundles (@provides/@depends parsing and resolution).
14
+ - **Static Compiler**: New `compile_bundle` entry point for unified asset compilation.
15
+
16
+ ### Changed
17
+
18
+ - **Quality Gate**: Refactored `BaseCheckRunner` to prioritize `pyproject.toml` over class attributes.
19
+ - **Developer Tools**: Simplified `tools/dev/check.py` to a thin launcher.
20
+ - **Documentation**: Updated architecture guides to promote declarative configuration.
21
+
22
+ ### Fixed
23
+
24
+ - **Quality Gate**: Resolved line length issues and suppressed security warnings (Bandit B603) for internal subprocess calls.
25
+
26
+ ## [0.2.2] - 2026-03-29
27
+
28
+ ### Fixed
29
+ - **CI Security Check Routing**: Updated `.github/workflows/ci.yml` to run lint, security, and type checks through `tools/dev/check.py` so GitHub Actions uses the same project-level check-runner policy as local development.
30
+ - **pip-audit Policy Drift**: Restored `AUDIT_FLAGS` handling in CI, including `--skip-editable` and the project-specific ignore for `CVE-2026-4539`.
31
+
8
32
  ## [0.2.1] - 2026-03-29
9
33
 
10
34
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codex-core
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Summary: Core utilities, schemas and settings for Codex WaaS toolkit
5
5
  Project-URL: Homepage, https://github.com/codexdlc/codex-core
6
6
  Project-URL: Documentation, https://codexdlc.github.io/codex-core/
@@ -40,22 +40,29 @@ python tools/dev/check.py --ci # everything non-interactively (GitHub A
40
40
 
41
41
  ### Project switches
42
42
 
43
- Projects can keep the shared orchestration and declare their local policy with
44
- simple boolean attributes on `CheckRunner`:
43
+ The preferred way to declare project-level quality gate policy is via `pyproject.toml` using the `[tool.codex-check]` section:
44
+
45
+ ```toml
46
+ [tool.codex-check]
47
+ project-name = "my-project"
48
+ audit-flags = "--skip-editable"
49
+ run-lint = true
50
+ run-types = true
51
+ run-security = true
52
+ run-unit-tests = true
53
+ run-integration-tests = false
54
+ test-stages = ["unit", "integration"]
55
+ prompt-test-stages = ["integration"]
56
+ ```
57
+
58
+ Legacy support for class attributes in `CheckRunner` is still available for backwards compatibility:
45
59
 
46
60
  ```python
47
61
  class CheckRunner(BaseCheckRunner):
48
- RUN_LINT = True
49
- RUN_TYPES = True
50
- RUN_SECURITY = True
51
- RUN_EXTRA_CHECKS = True
52
62
  RUN_UNIT_TESTS = True
53
63
  RUN_INTEGRATION_TESTS = False
54
64
  ```
55
65
 
56
- This is the preferred extension point when a library does not need every stage.
57
- Use method overrides only when behavior itself must change.
58
-
59
66
  ### Usage in a project
60
67
 
61
68
  ```python
@@ -171,6 +178,29 @@ JS source files into bundles. No Node.js, no external packages required.
171
178
  }
172
179
  ```
173
180
 
181
+ JS also supports a dependency-aware mode:
182
+
183
+ ```json
184
+ {
185
+ "js": {
186
+ "app.js": {
187
+ "strategy": "dependency_graph",
188
+ "entry": ["app/entry.js"],
189
+ "roots": ["core", "widgets", "builders", "app"]
190
+ }
191
+ }
192
+ }
193
+ ```
194
+
195
+ In this mode the compiler reads metadata from JS files:
196
+
197
+ ```js
198
+ /* @provides cabinet.widgets.client_lookup
199
+ @depends cabinet.core.dom, cabinet.core.events */
200
+ ```
201
+
202
+ and builds the bundle order automatically. The old ordered-mode with an explicit source list remains fully supported.
203
+
174
204
  Old CSS-only format is supported for backwards compatibility:
175
205
  ```json
176
206
  { "base.css": "app.css" }
@@ -40,22 +40,29 @@ python tools/dev/check.py --ci # всё без промптов (GitHub
40
40
 
41
41
  ### Проектные переключатели
42
42
 
43
- Проект может оставить общую оркестрацию и задать свою локальную политику через
44
- булевы атрибуты в `CheckRunner`:
43
+ Рекомендуемый способ задания проектной политики проверки качества — через секцию `[tool.codex-check]` в файле `pyproject.toml`:
44
+
45
+ ```toml
46
+ [tool.codex-check]
47
+ project-name = "my-project"
48
+ audit-flags = "--skip-editable"
49
+ run-lint = true
50
+ run-types = true
51
+ run-security = true
52
+ run-unit-tests = true
53
+ run-integration-tests = false
54
+ test-stages = ["unit", "integration"]
55
+ prompt-test-stages = ["integration"]
56
+ ```
57
+
58
+ Поддержка атрибутов класса в `CheckRunner` сохранена для обратной совместимости:
45
59
 
46
60
  ```python
47
61
  class CheckRunner(BaseCheckRunner):
48
- RUN_LINT = True
49
- RUN_TYPES = True
50
- RUN_SECURITY = True
51
- RUN_EXTRA_CHECKS = True
52
62
  RUN_UNIT_TESTS = True
53
63
  RUN_INTEGRATION_TESTS = False
54
64
  ```
55
65
 
56
- Это основной способ настройки, когда библиотеке не нужны все этапы проверки.
57
- Переопределяйте методы только тогда, когда нужно менять само поведение.
58
-
59
66
  ### Использование в проекте
60
67
 
61
68
  ```python
@@ -171,6 +178,29 @@ gen = ProjectTreeGenerator(
171
178
  }
172
179
  ```
173
180
 
181
+ Для JS также поддерживается dependency-aware режим:
182
+
183
+ ```json
184
+ {
185
+ "js": {
186
+ "app.js": {
187
+ "strategy": "dependency_graph",
188
+ "entry": ["app/entry.js"],
189
+ "roots": ["core", "widgets", "builders", "app"]
190
+ }
191
+ }
192
+ }
193
+ ```
194
+
195
+ В этом режиме компилятор читает metadata из JS-файлов:
196
+
197
+ ```js
198
+ /* @provides cabinet.widgets.client_lookup
199
+ @depends cabinet.core.dom, cabinet.core.events */
200
+ ```
201
+
202
+ И строит итоговый порядок автоматически. Старый ordered-mode через явный список файлов остаётся полностью поддержанным.
203
+
174
204
  Старый формат только для CSS поддерживается для обратной совместимости:
175
205
  ```json
176
206
  { "base.css": "app.css" }
@@ -110,3 +110,12 @@ exclude_lines = [
110
110
  [tool.bandit]
111
111
  exclude_dirs = ["tests"]
112
112
  skips = ["B602", "B605", "B607", "B404"]
113
+
114
+ [tool.codex-check]
115
+ project-name = "codex-core"
116
+ audit-flags = "--skip-editable --ignore-vuln CVE-2026-4539"
117
+ integration-requires = "Redis"
118
+ test-stages = ["unit", "integration"]
119
+ prompt-test-stages = ["integration"]
120
+ test-paths = ["tests"]
121
+ types-paths = ["src"]