codex-services 0.1.2__tar.gz → 0.1.4__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.
- codex_services-0.1.4/.agents/rules/graphify.md +10 -0
- codex_services-0.1.4/.agents/skills/codex-services-development/SKILL.md +37 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/.github/workflows/ci.yml +4 -4
- {codex_services-0.1.2 → codex_services-0.1.4}/.gitignore +3 -0
- codex_services-0.1.4/.graphifyignore +31 -0
- codex_services-0.1.4/AGENTS.md +11 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/CHANGELOG.md +24 -0
- codex_services-0.1.4/CLAUDE.md +11 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/PKG-INFO +45 -15
- codex_services-0.1.4/README.md +110 -0
- codex_services-0.1.4/docs/en/agent_skills.md +33 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/index.md +1 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/mkdocs.yml +1 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/pyproject.toml +10 -1
- codex_services-0.1.4/src/codex_services/agent_skills/__init__.py +1 -0
- codex_services-0.1.4/src/codex_services/agent_skills/__main__.py +4 -0
- codex_services-0.1.4/src/codex_services/agent_skills/cli.py +39 -0
- codex_services-0.1.4/src/codex_services/agent_skills/fs_transaction.py +174 -0
- codex_services-0.1.4/src/codex_services/agent_skills/manifest_rules.py +153 -0
- codex_services-0.1.4/src/codex_services/agent_skills/orchestrator.py +230 -0
- codex_services-0.1.4/src/codex_services/agent_skills/resources/SKILL.md +16 -0
- codex_services-0.1.4/src/codex_services/agent_skills/resources/__init__.py +1 -0
- codex_services-0.1.4/src/codex_services/agent_skills/resources/references/booking.md +26 -0
- codex_services-0.1.4/src/codex_services/agent_skills/resources/references/calendar.md +13 -0
- codex_services-0.1.4/src/codex_services/agent_skills/resources/references/slot-windows.md +22 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/booking/_shared/calculator.py +5 -5
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/booking/slot_master/dto.py +17 -15
- codex_services-0.1.4/tests/unit/agent_skills/__init__.py +1 -0
- codex_services-0.1.4/tests/unit/agent_skills/test_installer.py +177 -0
- codex_services-0.1.4/tests/unit/agent_skills/test_installer_reference.py +481 -0
- codex_services-0.1.4/tools/dev/check.py +13 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/uv.lock +99 -66
- codex_services-0.1.2/README.md +0 -80
- codex_services-0.1.2/tools/dev/check.py +0 -22
- {codex_services-0.1.2 → codex_services-0.1.4}/.github/workflows/docs.yml +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/.github/workflows/publish.yml +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/.pre-commit-config.yaml +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/.python-version +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/en/api/booking/index.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/en/api/booking/shared/calculator.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/en/api/booking/shared/dto.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/en/api/booking/shared/exceptions.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/en/api/booking/shared/interfaces.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/en/api/booking/shared/validators.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/en/api/booking/slot_master/api.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/en/api/booking/slot_master/chain_finder.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/en/api/booking/slot_master/dto.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/en/api/booking/slot_master/index.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/en/api/booking/slot_master/modes.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/en/api/booking/slot_master/scorer.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/en/api/calendar/engine.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/en/api/calendar/index.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/en/api/index.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/en/architecture/README.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/en/architecture/booking_engine.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/evolution/changelog.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/ru/architecture/README.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/ru/architecture/booking_engine.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/docs/stylesheets/extra.css +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/project_structure.txt +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/scripts/generate_api_docs.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/__init__.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/booking/__init__.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/booking/_shared/__init__.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/booking/_shared/dto.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/booking/_shared/exceptions.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/booking/_shared/interfaces.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/booking/_shared/validators.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/booking/room/__init__.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/booking/slot_master/__init__.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/booking/slot_master/api.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/booking/slot_master/chain_finder.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/booking/slot_master/modes.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/booking/slot_master/scorer.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/calendar/__init__.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/calendar/engine.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/src/codex_services/py.typed +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tests/conftest.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tests/integration/__init__.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tests/integration/conftest.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tests/integration/test_booking_components_integration.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tests/integration/test_calendar_integration.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tests/integration/test_chain_finder_integration.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tests/unit/__init__.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tests/unit/conftest.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tests/unit/test_api.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tests/unit/test_booking_validator.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tests/unit/test_calendar_engine.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tests/unit/test_chain_finder.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tests/unit/test_dto.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tests/unit/test_exceptions.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tests/unit/test_scorer.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tests/unit/test_slot_calculator.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tools/__init__.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tools/dev/README.md +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tools/dev/__init__.py +0 -0
- {codex_services-0.1.2 → codex_services-0.1.4}/tools/dev/generate_project_tree.py +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
## Local code graph
|
|
2
|
+
|
|
3
|
+
This repository uses only its own `graphify-out/`. It does not depend on the parent workspace graph.
|
|
4
|
+
|
|
5
|
+
- Before architecture or code-navigation work, read `graphify-out/GRAPH_REPORT.md` when available. If a local `graphify-out/wiki/index.md` exists, use it as an additional entrypoint; native code updates do not generate a wiki.
|
|
6
|
+
- Follow `.graphifyignore` to keep environments, caches, build outputs, generated documentation sites, and graph output out of the corpus. Never run the update from the parent workspace for work on this library.
|
|
7
|
+
- Build or refresh with `graphify update .` from this repository root, using the separately installed Graphify tool. This is an AST-only code update, with no LLM/API calls. Documentation may be counted in corpus detection but is not semantically extracted by this command; consult source documentation and skills directly.
|
|
8
|
+
- For relationships within this library, use `graphify query`, `graphify path`, or `graphify explain` from this repository root when they help. Verify inferred relationships against current code. For cross-library contracts, consult public APIs and the relevant library skills.
|
|
9
|
+
- After changing code or graph exclusions, refresh the local graph. If no graph exists or the tool fails, inspect current source and report the missing/stale graph; do not silently fall back to a shared graph.
|
|
10
|
+
- `graphify-out/` is generated local data, ignored by Git and excluded from release artifacts. Commit `.graphifyignore` and these instructions, not graph JSON, reports, HTML, wiki pages, caches, or machine-specific interpreter paths.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: codex-services-development
|
|
3
|
+
description: Develop and validate the codex-services library itself, including booking algorithms, calendar behavior, packaged consumer skills and release artifacts. Use in its source checkout; consumer integrations use the shipped codex-services skill.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# codex-services development
|
|
7
|
+
|
|
8
|
+
## Ownership and navigation
|
|
9
|
+
|
|
10
|
+
This repository publishes `codex-services` through `pyproject.toml` and `.github/workflows/publish.yml`. Keep development guidance here. Consumer guidance belongs in `src/codex_services/agent_skills/resources/`; do not install that managed copy over this development skill.
|
|
11
|
+
|
|
12
|
+
Read `.agents/rules/graphify.md` for the library-local `graphify-out/` scope and rebuild command. Use the local report (and wiki when present) for orientation, then inspect the relevant current source and tests: graph edges may be inferred or stale. Cross-library contracts belong in public APIs and the relevant library skills, not a shared workspace graph.
|
|
13
|
+
|
|
14
|
+
- Booking search: `src/codex_services/booking/slot_master/` and `tests/unit/`, `tests/integration/`; architecture context in `docs/en/architecture/booking_engine.md`.
|
|
15
|
+
- Slot arithmetic and provider contracts: `src/codex_services/booking/_shared/`.
|
|
16
|
+
- Calendar rendering data: `src/codex_services/calendar/`.
|
|
17
|
+
- Skill installation and packaged instructions: `src/codex_services/agent_skills/` and its tests. Treat installed consumer copies and manifests as managed output.
|
|
18
|
+
|
|
19
|
+
## Contracts that affect changes
|
|
20
|
+
|
|
21
|
+
- Business engines remain framework-independent. ORM access, persistence, HTTP and application policy belong in consumer adapters, not the booking/calendar engines.
|
|
22
|
+
- Preserve the distinction between the dictionary facade (`find_slots`, `find_nearest_slots`) and the typed `ChainFinder` API. Verify actual signatures before adapting examples; resource IDs use `possible_resource_ids` and `resource_id`.
|
|
23
|
+
- Booking DTOs derive from `codex-core` BaseDTO. Preserve immutable-model semantics and PII-safe representations; do not add customer payloads to logs.
|
|
24
|
+
- Recursive search uses lightweight `_SlotCandidate` instances and creates Pydantic solutions at the result boundary. Avoid moving model validation into the backtracking loop without evidence.
|
|
25
|
+
- An enum value is not proof a booking mode is implemented. Check `ChainFinder` guards and tests before documenting support.
|
|
26
|
+
- Calendar holiday support is optional (`calendar` extra). Keep the base installation usable without it.
|
|
27
|
+
- Skill delivery is explicitly invoked and offline. Changes to update/delete must preserve unrelated consumer content and detect modified managed files; test against an isolated project.
|
|
28
|
+
|
|
29
|
+
## Verification and release work
|
|
30
|
+
|
|
31
|
+
Use the configured environment; project commands are `uv run pytest`, `uv run mypy src/`, and `uv run pre-commit run --all-files`. An existing environment can run the equivalent Python modules. Inspect `.github/workflows/ci.yml` for the Python-version unit-test matrix and the subsequent full-suite coverage gate (including integration tests). Coverage is configured with a 90% threshold; report failing or skipped checks honestly.
|
|
32
|
+
|
|
33
|
+
For packaging or skill payload changes, build with `uv build --no-sources`, inspect wheel and sdist contents, and exercise installation from the wheel outside the source checkout. Check executable examples against the packaged public API and ensure reference links stay inside the shipped payload.
|
|
34
|
+
|
|
35
|
+
Version comes from Git tags via hatch-vcs. Record pending changes under `CHANGELOG.md` Unreleased; a local dirty-build version is not a release tag. Publishing is triggered by a `v*` tag. Preparing a release does not itself authorize creating/pushing that tag or publishing.
|
|
36
|
+
|
|
37
|
+
After changes affecting graph inputs, rebuild the local graph using `.agents/rules/graphify.md`. Keep generated graph files out of Git and release artifacts; commit only build rules and instructions. If the graph is missing or rebuilding fails, inspect current sources and report the limitation rather than treating a stale graph as current.
|
|
@@ -56,10 +56,10 @@ jobs:
|
|
|
56
56
|
run: uv sync --locked --extra dev
|
|
57
57
|
|
|
58
58
|
- name: Run unit tests
|
|
59
|
-
run: uv run pytest tests/ -m "unit" -v --tb=short
|
|
59
|
+
run: uv run pytest tests/ -m "unit" --no-cov -v --tb=short
|
|
60
60
|
|
|
61
61
|
integration-tests:
|
|
62
|
-
name:
|
|
62
|
+
name: Full Suite and Coverage
|
|
63
63
|
needs: unit-tests
|
|
64
64
|
runs-on: ubuntu-latest
|
|
65
65
|
env:
|
|
@@ -76,5 +76,5 @@ jobs:
|
|
|
76
76
|
- name: Sync dev environment
|
|
77
77
|
run: uv sync --locked --extra dev
|
|
78
78
|
|
|
79
|
-
- name: Run integration tests
|
|
80
|
-
run: uv run pytest tests/ -
|
|
79
|
+
- name: Run full suite including integration tests and enforce total coverage
|
|
80
|
+
run: uv run pytest tests/ -v --tb=short
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Graphify runs from this library root. Do not ingest generated artifacts or
|
|
2
|
+
# local environments; the graph is rebuilt from library source, tests, scripts,
|
|
3
|
+
# and documentation in this checkout.
|
|
4
|
+
graphify-out/
|
|
5
|
+
project_structure.txt
|
|
6
|
+
site/
|
|
7
|
+
dist/
|
|
8
|
+
build/
|
|
9
|
+
sdist/
|
|
10
|
+
wheels/
|
|
11
|
+
htmlcov/
|
|
12
|
+
coverage/
|
|
13
|
+
out/
|
|
14
|
+
target/
|
|
15
|
+
downloads/
|
|
16
|
+
*.egg-info/
|
|
17
|
+
.venv/
|
|
18
|
+
venv/
|
|
19
|
+
env/
|
|
20
|
+
.cache/
|
|
21
|
+
.git/
|
|
22
|
+
.agents/
|
|
23
|
+
.claude/
|
|
24
|
+
.idea/
|
|
25
|
+
.vscode/
|
|
26
|
+
node_modules/
|
|
27
|
+
__pycache__/
|
|
28
|
+
.pytest_cache/
|
|
29
|
+
.mypy_cache/
|
|
30
|
+
.ruff_cache/
|
|
31
|
+
.uv-cache/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## Project skills
|
|
2
|
+
|
|
3
|
+
For development of this library, read `.agents/skills/codex-services-development/SKILL.md`.
|
|
4
|
+
Consumer usage guidance is maintained separately in `src/codex_services/agent_skills/resources/`
|
|
5
|
+
and shipped with the library; do not replace the development skill with an installed consumer copy.
|
|
6
|
+
|
|
7
|
+
## graphify
|
|
8
|
+
|
|
9
|
+
This library owns its local graph in `graphify-out/`. Follow `.agents/rules/graphify.md`
|
|
10
|
+
for scope, navigation, and rebuilding. Graph commands run from this repository root,
|
|
11
|
+
not the parent workspace. The generated graph is ignored by Git.
|
|
@@ -7,6 +7,30 @@ All notable changes to this project will be documented in this file.
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.4] - 2026-10-09
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Packaged consumer agent skill with booking and calendar usage guidance and an offline install/update/delete/status CLI.
|
|
14
|
+
- Source-development skill in `.agents/skills/codex-services-development`, linked from project agent instructions.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- Moved development graph navigation to a library-local, Git-ignored `graphify-out/` with reproducible source-scoped generation.
|
|
18
|
+
- CI enforces the existing 90% coverage threshold on the full test suite after the Python-version unit-test matrix.
|
|
19
|
+
- Documented agent skill installation, discovery, updates, and local-edit recovery; corrected the README booking example to use the current dictionary API.
|
|
20
|
+
- Translated all Russian comments and Pydantic field descriptions to English across `booking/_shared/calculator.py` and `booking/slot_master/dto.py`.
|
|
21
|
+
|
|
22
|
+
### Security
|
|
23
|
+
- Refreshed vulnerable locked dependencies (`idna`, `msgpack`, `pip`, `pydantic-settings`, `pytest`, `urllib3`, and `virtualenv`) within the existing package constraints, including the required `python-discovery` update.
|
|
24
|
+
|
|
25
|
+
## [0.1.3] - 2026-04-05
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
- **Core dependency**:
|
|
29
|
+
- Updated the supported `codex-core` dependency range to `>=0.3.0,<1.0.0` so the package remains compatible with the planned pre-`1.0` `codex-core` line without repeated dependency-range bumps.
|
|
30
|
+
- **Development tooling**:
|
|
31
|
+
- Moved project quality-gate policy into `[tool.codex-check]` in `pyproject.toml`.
|
|
32
|
+
- Simplified `tools/dev/check.py` to a thin launcher compatible with the `codex-core 0.3.x` runner flow.
|
|
33
|
+
|
|
10
34
|
## [0.1.2] - 2026-03-29
|
|
11
35
|
|
|
12
36
|
### Added
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## Project skills
|
|
2
|
+
|
|
3
|
+
For development of this library, read `.agents/skills/codex-services-development/SKILL.md`.
|
|
4
|
+
Consumer usage guidance is maintained separately in `src/codex_services/agent_skills/resources/`
|
|
5
|
+
and shipped with the library; do not replace the development skill with an installed consumer copy.
|
|
6
|
+
|
|
7
|
+
## graphify
|
|
8
|
+
|
|
9
|
+
This library owns its local graph in `graphify-out/`. Follow `.agents/rules/graphify.md`
|
|
10
|
+
for scope, navigation, and rebuilding. Graph commands run from this repository root,
|
|
11
|
+
not the parent workspace. The generated graph is ignored by Git.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: codex-services
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: Reusable business logic engines for Codex platform (CRM, finance, HR, inventory)
|
|
5
5
|
Project-URL: Homepage, https://github.com/codexdlc/codex-services
|
|
6
6
|
Project-URL: Documentation, https://codexdlc.github.io/codex-services/
|
|
@@ -15,7 +15,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
17
|
Requires-Python: >=3.12
|
|
18
|
-
Requires-Dist: codex-core<0.
|
|
18
|
+
Requires-Dist: codex-core<1.0.0,>=0.3.0
|
|
19
19
|
Requires-Dist: pydantic<3.0,>=2.0
|
|
20
20
|
Provides-Extra: all
|
|
21
21
|
Requires-Dist: holidays>=0.40; extra == 'all'
|
|
@@ -47,7 +47,7 @@ Description-Content-Type: text/markdown
|
|
|
47
47
|
[](https://pypi.org/project/codex-services/)
|
|
48
48
|
[](https://pypi.org/project/codex-services/)
|
|
49
49
|
[](https://github.com/codexdlc/codex-services/actions/workflows/ci.yml)
|
|
50
|
-
[](LICENSE)
|
|
50
|
+
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
51
51
|
|
|
52
52
|
Pure-Python business logic engines for booking, scheduling, and CRM workflows.
|
|
53
53
|
No ORM, no framework dependencies — drop into any Python project or use as a building block inside the Codex ecosystem.
|
|
@@ -75,25 +75,55 @@ uv run pre-commit run --all-files
|
|
|
75
75
|
uv build --no-sources
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
+
### Local code graph
|
|
79
|
+
|
|
80
|
+
For source-checkout navigation, install Graphify separately and run from this repository root:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
graphify update .
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
This builds an AST-only code graph in `graphify-out/`, using `.graphifyignore` to exclude environments, caches, and generated outputs. It does not use the parent workspace graph or an LLM API. Read documentation and skills directly for explanations beyond the code structure; this command does not perform semantic documentation extraction or generate a wiki.
|
|
87
|
+
|
|
88
|
+
The graph is generated local data and is not committed or shipped in releases. Commit only `.graphifyignore` and the build instructions. See [.agents/rules/graphify.md](.agents/rules/graphify.md) for navigation and refresh rules.
|
|
89
|
+
|
|
78
90
|
## Quick Start
|
|
79
91
|
|
|
80
92
|
```python
|
|
81
|
-
from codex_services.booking.slot_master import find_slots
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
93
|
+
from codex_services.booking.slot_master import find_slots
|
|
94
|
+
|
|
95
|
+
result = find_slots(
|
|
96
|
+
request_data={
|
|
97
|
+
"booking_date": "2026-10-12",
|
|
98
|
+
"service_requests": [
|
|
99
|
+
{"service_id": "haircut", "duration_minutes": 60, "possible_resource_ids": ["m1"]},
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
resources_availability=[
|
|
103
|
+
{"resource_id": "m1", "free_windows": [["2026-10-12T09:00:00", "2026-10-12T11:00:00"]]},
|
|
87
104
|
],
|
|
88
|
-
booking_date=date.today(),
|
|
89
|
-
mode=BookingMode.SINGLE_DAY,
|
|
90
105
|
)
|
|
106
|
+
for chain in result["solutions"]:
|
|
107
|
+
print(chain["items"][0]["start_time"])
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Optional agent skill
|
|
111
|
+
|
|
112
|
+
Starting with **0.1.4**, the package includes an optional skill that helps coding agents use its booking, slot arithmetic, and calendar APIs. The skill is bundled with the library; no separate plugin or download is needed.
|
|
113
|
+
|
|
114
|
+
From the root of a consuming project, using the Python environment where `codex-services` is installed:
|
|
91
115
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
116
|
+
```bash
|
|
117
|
+
python -m codex_services.agent_skills install --project .
|
|
118
|
+
python -m codex_services.agent_skills status --project .
|
|
95
119
|
```
|
|
96
120
|
|
|
121
|
+
`install` copies the versioned guide to `.agents/skills/codex-services` and adds a scoped instruction to the project's `AGENTS.md`. The installer stores file hashes in `.manifest.json`; `update` and `delete` refuse to replace locally edited managed files. Put local rules in a separate project-owned skill. The installer preserves unrelated files and `AGENTS.md` content, and no skill is installed as part of importing or installing the package.
|
|
122
|
+
|
|
123
|
+
After upgrading the Python package, refresh the project's skill with `python -m codex_services.agent_skills update --project .`. To remove the managed skill, use `python -m codex_services.agent_skills delete --project .`.
|
|
124
|
+
|
|
125
|
+
See the [agent skill guide](docs/en/agent_skills.md) for paths with spaces, status checks, updates, and local-edit recovery.
|
|
126
|
+
|
|
97
127
|
## Modules
|
|
98
128
|
|
|
99
129
|
| Module | Extra | Description |
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# codex-services
|
|
2
|
+
<!-- Type: LANDING -->
|
|
3
|
+
|
|
4
|
+
[](https://pypi.org/project/codex-services/)
|
|
5
|
+
[](https://pypi.org/project/codex-services/)
|
|
6
|
+
[](https://github.com/codexdlc/codex-services/actions/workflows/ci.yml)
|
|
7
|
+
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
8
|
+
|
|
9
|
+
Pure-Python business logic engines for booking, scheduling, and CRM workflows.
|
|
10
|
+
No ORM, no framework dependencies — drop into any Python project or use as a building block inside the Codex ecosystem.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pip install codex-services
|
|
18
|
+
|
|
19
|
+
# With holiday calendar support
|
|
20
|
+
pip install "codex-services[calendar]"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Requires Python 3.12 or newer.
|
|
24
|
+
|
|
25
|
+
## Development
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
uv sync --extra dev
|
|
29
|
+
uv run pytest
|
|
30
|
+
uv run mypy src/
|
|
31
|
+
uv run pre-commit run --all-files
|
|
32
|
+
uv build --no-sources
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Local code graph
|
|
36
|
+
|
|
37
|
+
For source-checkout navigation, install Graphify separately and run from this repository root:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
graphify update .
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
This builds an AST-only code graph in `graphify-out/`, using `.graphifyignore` to exclude environments, caches, and generated outputs. It does not use the parent workspace graph or an LLM API. Read documentation and skills directly for explanations beyond the code structure; this command does not perform semantic documentation extraction or generate a wiki.
|
|
44
|
+
|
|
45
|
+
The graph is generated local data and is not committed or shipped in releases. Commit only `.graphifyignore` and the build instructions. See [.agents/rules/graphify.md](.agents/rules/graphify.md) for navigation and refresh rules.
|
|
46
|
+
|
|
47
|
+
## Quick Start
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
from codex_services.booking.slot_master import find_slots
|
|
51
|
+
|
|
52
|
+
result = find_slots(
|
|
53
|
+
request_data={
|
|
54
|
+
"booking_date": "2026-10-12",
|
|
55
|
+
"service_requests": [
|
|
56
|
+
{"service_id": "haircut", "duration_minutes": 60, "possible_resource_ids": ["m1"]},
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
resources_availability=[
|
|
60
|
+
{"resource_id": "m1", "free_windows": [["2026-10-12T09:00:00", "2026-10-12T11:00:00"]]},
|
|
61
|
+
],
|
|
62
|
+
)
|
|
63
|
+
for chain in result["solutions"]:
|
|
64
|
+
print(chain["items"][0]["start_time"])
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Optional agent skill
|
|
68
|
+
|
|
69
|
+
Starting with **0.1.4**, the package includes an optional skill that helps coding agents use its booking, slot arithmetic, and calendar APIs. The skill is bundled with the library; no separate plugin or download is needed.
|
|
70
|
+
|
|
71
|
+
From the root of a consuming project, using the Python environment where `codex-services` is installed:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
python -m codex_services.agent_skills install --project .
|
|
75
|
+
python -m codex_services.agent_skills status --project .
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`install` copies the versioned guide to `.agents/skills/codex-services` and adds a scoped instruction to the project's `AGENTS.md`. The installer stores file hashes in `.manifest.json`; `update` and `delete` refuse to replace locally edited managed files. Put local rules in a separate project-owned skill. The installer preserves unrelated files and `AGENTS.md` content, and no skill is installed as part of importing or installing the package.
|
|
79
|
+
|
|
80
|
+
After upgrading the Python package, refresh the project's skill with `python -m codex_services.agent_skills update --project .`. To remove the managed skill, use `python -m codex_services.agent_skills delete --project .`.
|
|
81
|
+
|
|
82
|
+
See the [agent skill guide](docs/en/agent_skills.md) for paths with spaces, status checks, updates, and local-edit recovery.
|
|
83
|
+
|
|
84
|
+
## Modules
|
|
85
|
+
|
|
86
|
+
| Module | Extra | Description |
|
|
87
|
+
| :--- | :--- | :--- |
|
|
88
|
+
| `codex_services.booking.slot_master` | — | Recursive chain-finder for multi-service bookings with scoring and waitlist |
|
|
89
|
+
| `codex_services.booking._shared` | — | Low-level slot arithmetic — windows, gaps, busy interval merging |
|
|
90
|
+
| `codex_services.calendar` | `[calendar]` | Calendar grid generator for UI rendering with holiday awareness |
|
|
91
|
+
|
|
92
|
+
## Documentation
|
|
93
|
+
|
|
94
|
+
Full docs with architecture, API reference, and data flow diagrams:
|
|
95
|
+
|
|
96
|
+
**[https://codexdlc.github.io/codex-services/](https://codexdlc.github.io/codex-services/)**
|
|
97
|
+
|
|
98
|
+
## Part of the Codex ecosystem
|
|
99
|
+
|
|
100
|
+
| Package | Role |
|
|
101
|
+
| :--- | :--- |
|
|
102
|
+
| [codex-core](https://github.com/codexdlc/codex-core) | Foundation — immutable DTOs, PII masking, env settings |
|
|
103
|
+
| [codex-platform](https://github.com/codexdlc/codex-platform) | Infrastructure — Redis, Streams, ARQ workers, Notifications |
|
|
104
|
+
| [codex-ai](https://github.com/codexdlc/codex-ai) | LLM layer — unified async interface for OpenAI, Gemini, Anthropic |
|
|
105
|
+
| **codex-services** | Business logic — Booking engine, CRM, Calendar |
|
|
106
|
+
|
|
107
|
+
Each library is **fully standalone** — install only what your project needs.
|
|
108
|
+
Together they form the backbone of **[codex-bot](https://github.com/codexdlc/codex-bot)**
|
|
109
|
+
(Telegram AI-agent infrastructure built on aiogram) and
|
|
110
|
+
**[codex-django](https://github.com/codexdlc/codex-django)** (Django integration layer).
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Optional agent skill
|
|
2
|
+
|
|
3
|
+
Starting with version **0.1.4**, `codex-services` ships a versioned, offline skill for coding agents covering booking chains, slot arithmetic, and calendar grids. Installing the Python package does not change your project files. Run the command explicitly from the environment where the package is installed:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
python -m codex_services.agent_skills install --project /path/to/project
|
|
7
|
+
python -m codex_services.agent_skills status --project /path/to/project
|
|
8
|
+
python -m codex_services.agent_skills update --project /path/to/project
|
|
9
|
+
python -m codex_services.agent_skills delete --project /path/to/project
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The guide lives at `.agents/skills/codex-services/SKILL.md` in the consumer project. The installer adds one marked instruction to `AGENTS.md` and records the package version and SHA-256 hashes in `.manifest.json`. `status` reports missing or edited files and whether the payload matches the installed package. `update` requires an existing managed installation and refuses to overwrite local edits; `delete` likewise refuses to discard edited managed files. Both preserve unrelated files and the rest of `AGENTS.md`.
|
|
13
|
+
|
|
14
|
+
Keep project-specific business rules and integrations in a separate project-owned skill. The copied library guide and its manifest are managed outputs. Restore edited managed files or move custom notes to a project-owned file before running `update` or `delete` again.
|
|
15
|
+
|
|
16
|
+
## Project paths and discovery
|
|
17
|
+
|
|
18
|
+
Use `--project .` when running from the consuming project's root. The target directory must already exist. Quote paths containing spaces, for example `--project "D:/Projects/My App"` on Windows. The installer does not install a global skill or modify the agent's global configuration.
|
|
19
|
+
|
|
20
|
+
Agents that read project `AGENTS.md` or discover `.agents/skills/` can find the installed guide. Agents with different discovery conventions may need to be pointed at `.agents/skills/codex-services/SKILL.md` explicitly.
|
|
21
|
+
|
|
22
|
+
## Upgrading and checking
|
|
23
|
+
|
|
24
|
+
Upgrade the Python package with your project's normal dependency manager, then run:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
python -m codex_services.agent_skills update --project .
|
|
28
|
+
python -m codex_services.agent_skills status --project .
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The refresh uses only resources bundled with the installed package and does not access the network. `status` exits with code 0 only when the managed installation matches that package. Exit code 1 means it is absent, outdated, edited, corrupt, or could not be checked; read the accompanying message before acting. On a project without the skill, use `install` rather than `update`.
|
|
32
|
+
|
|
33
|
+
If an update or deletion is refused, keep a copy of your changes outside the managed directory, move application-specific instructions into a project-owned skill, and restore the original managed content before retrying. Do not edit the manifest hashes to bypass the check. Deleting the skill does not uninstall the Python package.
|
|
@@ -10,4 +10,5 @@ Welcome to the central documentation hub for Codex Services, organized by the Do
|
|
|
10
10
|
| :--- | :--- |
|
|
11
11
|
| **[Architecture](en/architecture/README.md)** | Ecosystem architecture, concepts, and data-flow specifications |
|
|
12
12
|
| **[API Reference](en/api/index.md)** | Precise code reference directly mapped from docstrings |
|
|
13
|
+
| **[Agent skill](en/agent_skills.md)** | Install and maintain the bundled coding-agent guide in a consuming project |
|
|
13
14
|
| **[Evolution / Changelog](evolution/changelog.md)** | Project history, semantic versioning, and deprecation details |
|
|
@@ -20,7 +20,7 @@ classifiers = [
|
|
|
20
20
|
]
|
|
21
21
|
dependencies = [
|
|
22
22
|
"pydantic>=2.0,<3.0",
|
|
23
|
-
"codex-core>=0.
|
|
23
|
+
"codex-core>=0.3.0,<1.0.0", # Зависимость от ядра
|
|
24
24
|
]
|
|
25
25
|
|
|
26
26
|
[project.urls]
|
|
@@ -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-services"
|
|
116
|
+
audit-flags = "--skip-editable --ignore-vuln CVE-2026-4539"
|
|
117
|
+
integration-requires = "pure Python, no external deps"
|
|
118
|
+
test-stages = ["unit", "integration"]
|
|
119
|
+
prompt-test-stages = ["integration"]
|
|
120
|
+
test-paths = ["tests"]
|
|
121
|
+
types-paths = ["src"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# empty module
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
import sys
|
|
3
|
+
from collections.abc import Sequence
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
from codex_services.agent_skills.fs_transaction import FSError
|
|
7
|
+
from codex_services.agent_skills.orchestrator import OrchestratorError, check_status, perform_delete, perform_install
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def main(args: Sequence[str] | None = None) -> None:
|
|
11
|
+
parser = argparse.ArgumentParser(prog="python -m codex_services.agent_skills")
|
|
12
|
+
parser.add_argument("action", choices=["install", "update", "delete", "status"])
|
|
13
|
+
parser.add_argument("--project", required=True, help="Path to project root")
|
|
14
|
+
|
|
15
|
+
parsed = parser.parse_args(args)
|
|
16
|
+
|
|
17
|
+
project_dir = Path(parsed.project).absolute()
|
|
18
|
+
if not project_dir.is_dir():
|
|
19
|
+
print(f"Error: Project directory does not exist or is not a directory: {project_dir}", file=sys.stderr)
|
|
20
|
+
sys.exit(1)
|
|
21
|
+
|
|
22
|
+
try:
|
|
23
|
+
if parsed.action == "install":
|
|
24
|
+
perform_install(project_dir, update=False)
|
|
25
|
+
print("Installed successfully.")
|
|
26
|
+
elif parsed.action == "update":
|
|
27
|
+
perform_install(project_dir, update=True)
|
|
28
|
+
print("Updated successfully.")
|
|
29
|
+
elif parsed.action == "delete":
|
|
30
|
+
perform_delete(project_dir)
|
|
31
|
+
print("Deleted successfully.")
|
|
32
|
+
elif parsed.action == "status":
|
|
33
|
+
is_valid, msg = check_status(project_dir)
|
|
34
|
+
print(msg)
|
|
35
|
+
if not is_valid:
|
|
36
|
+
sys.exit(1)
|
|
37
|
+
except (OrchestratorError, FSError) as e:
|
|
38
|
+
print(f"Error: {e}", file=sys.stderr)
|
|
39
|
+
sys.exit(1)
|