orchcore 0.1.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.
- orchcore-0.1.0/.gitignore +67 -0
- orchcore-0.1.0/.pre-commit-config.yaml +16 -0
- orchcore-0.1.0/CHANGELOG.md +65 -0
- orchcore-0.1.0/CODE_OF_CONDUCT.md +108 -0
- orchcore-0.1.0/CONTRIBUTING.md +29 -0
- orchcore-0.1.0/LICENSE +21 -0
- orchcore-0.1.0/Makefile +30 -0
- orchcore-0.1.0/PKG-INFO +194 -0
- orchcore-0.1.0/README.md +145 -0
- orchcore-0.1.0/SECURITY.md +32 -0
- orchcore-0.1.0/pyproject.toml +138 -0
- orchcore-0.1.0/src/orchcore/__init__.py +9 -0
- orchcore-0.1.0/src/orchcore/__main__.py +15 -0
- orchcore-0.1.0/src/orchcore/_version.py +24 -0
- orchcore-0.1.0/src/orchcore/config/__init__.py +11 -0
- orchcore-0.1.0/src/orchcore/config/schema.py +14 -0
- orchcore-0.1.0/src/orchcore/config/settings.py +309 -0
- orchcore-0.1.0/src/orchcore/display/__init__.py +35 -0
- orchcore-0.1.0/src/orchcore/display/formatting.py +56 -0
- orchcore-0.1.0/src/orchcore/display/logging.py +99 -0
- orchcore-0.1.0/src/orchcore/observability/__init__.py +5 -0
- orchcore-0.1.0/src/orchcore/observability/telemetry.py +172 -0
- orchcore-0.1.0/src/orchcore/pipeline/__init__.py +26 -0
- orchcore-0.1.0/src/orchcore/pipeline/control.py +69 -0
- orchcore-0.1.0/src/orchcore/pipeline/engine.py +770 -0
- orchcore-0.1.0/src/orchcore/pipeline/phase.py +66 -0
- orchcore-0.1.0/src/orchcore/pipeline/pipeline.py +328 -0
- orchcore-0.1.0/src/orchcore/prompt/__init__.py +19 -0
- orchcore-0.1.0/src/orchcore/prompt/loader.py +68 -0
- orchcore-0.1.0/src/orchcore/prompt/template.py +117 -0
- orchcore-0.1.0/src/orchcore/py.typed +0 -0
- orchcore-0.1.0/src/orchcore/recovery/__init__.py +14 -0
- orchcore-0.1.0/src/orchcore/recovery/git_recovery.py +113 -0
- orchcore-0.1.0/src/orchcore/recovery/rate_limit.py +214 -0
- orchcore-0.1.0/src/orchcore/recovery/retry.py +82 -0
- orchcore-0.1.0/src/orchcore/registry/__init__.py +19 -0
- orchcore-0.1.0/src/orchcore/registry/agent.py +87 -0
- orchcore-0.1.0/src/orchcore/registry/registry.py +113 -0
- orchcore-0.1.0/src/orchcore/runner/__init__.py +5 -0
- orchcore-0.1.0/src/orchcore/runner/subprocess.py +550 -0
- orchcore-0.1.0/src/orchcore/signals/__init__.py +5 -0
- orchcore-0.1.0/src/orchcore/signals/handler.py +92 -0
- orchcore-0.1.0/src/orchcore/stream/__init__.py +31 -0
- orchcore-0.1.0/src/orchcore/stream/events.py +169 -0
- orchcore-0.1.0/src/orchcore/stream/filter.py +91 -0
- orchcore-0.1.0/src/orchcore/stream/monitor.py +238 -0
- orchcore-0.1.0/src/orchcore/stream/parser.py +811 -0
- orchcore-0.1.0/src/orchcore/stream/stall.py +130 -0
- orchcore-0.1.0/src/orchcore/ui/__init__.py +5 -0
- orchcore-0.1.0/src/orchcore/ui/callback.py +169 -0
- orchcore-0.1.0/src/orchcore/workspace/__init__.py +5 -0
- orchcore-0.1.0/src/orchcore/workspace/manager.py +158 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# AI tool configurations
|
|
2
|
+
.claude/
|
|
3
|
+
.codex/
|
|
4
|
+
AGENTS.md
|
|
5
|
+
CLAUDE.md
|
|
6
|
+
|
|
7
|
+
# Documentation (generated/managed separately)
|
|
8
|
+
docs/
|
|
9
|
+
|
|
10
|
+
# OS files
|
|
11
|
+
.DS_Store
|
|
12
|
+
Thumbs.db
|
|
13
|
+
Desktop.ini
|
|
14
|
+
|
|
15
|
+
# Python
|
|
16
|
+
src/orchcore/_version.py
|
|
17
|
+
__pycache__/
|
|
18
|
+
*.py[cod]
|
|
19
|
+
*$py.class
|
|
20
|
+
*.egg-info/
|
|
21
|
+
*.egg
|
|
22
|
+
dist/
|
|
23
|
+
build/
|
|
24
|
+
.eggs/
|
|
25
|
+
*.whl
|
|
26
|
+
.venv/
|
|
27
|
+
venv/
|
|
28
|
+
env/
|
|
29
|
+
.env
|
|
30
|
+
.env.*
|
|
31
|
+
!.env.example
|
|
32
|
+
|
|
33
|
+
# IDE / Editor
|
|
34
|
+
.vscode/
|
|
35
|
+
.idea/
|
|
36
|
+
*.swp
|
|
37
|
+
*.swo
|
|
38
|
+
*~
|
|
39
|
+
.project
|
|
40
|
+
.settings/
|
|
41
|
+
.classpath
|
|
42
|
+
|
|
43
|
+
# Node (if applicable)
|
|
44
|
+
node_modules/
|
|
45
|
+
npm-debug.log*
|
|
46
|
+
yarn-debug.log*
|
|
47
|
+
yarn-error.log*
|
|
48
|
+
|
|
49
|
+
# Testing / Coverage
|
|
50
|
+
.coverage
|
|
51
|
+
.coverage.*
|
|
52
|
+
htmlcov/
|
|
53
|
+
.hypothesis/
|
|
54
|
+
.pytest_cache/
|
|
55
|
+
.mypy_cache/
|
|
56
|
+
.ruff_cache/
|
|
57
|
+
|
|
58
|
+
# Logs
|
|
59
|
+
*.log
|
|
60
|
+
logs/
|
|
61
|
+
|
|
62
|
+
# Secrets / Credentials
|
|
63
|
+
*.pem
|
|
64
|
+
*.key
|
|
65
|
+
credentials.json
|
|
66
|
+
secrets.yaml
|
|
67
|
+
secrets.yml
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v6.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-merge-conflict
|
|
6
|
+
- id: check-toml
|
|
7
|
+
- id: end-of-file-fixer
|
|
8
|
+
- id: trailing-whitespace
|
|
9
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
10
|
+
rev: v0.15.8
|
|
11
|
+
hooks:
|
|
12
|
+
- id: ruff-check
|
|
13
|
+
args:
|
|
14
|
+
- --fix
|
|
15
|
+
- --exit-non-zero-on-fix
|
|
16
|
+
- id: ruff-format
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.1.0](https://github.com/AbdelazizMoustafa10m/orchcore/compare/v0.0.1...v0.1.0) (2026-03-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add phase 3 orchestration modules ([ad9cff0](https://github.com/AbdelazizMoustafa10m/orchcore/commit/ad9cff0f38e52dadf6eecc2cf5cea09a30dcbc39))
|
|
9
|
+
* add phase 4 recovery and telemetry ([0a7e646](https://github.com/AbdelazizMoustafa10m/orchcore/commit/0a7e64618b4947591dab82fc24611a3bac8adf0a))
|
|
10
|
+
* add stream processing pipeline with full test coverage (Phase 1) ([68ea98f](https://github.com/AbdelazizMoustafa10m/orchcore/commit/68ea98fb09e94b230647d34bfb0ec5546fc3f7e6))
|
|
11
|
+
* add telemetry extra dependencies ([1472297](https://github.com/AbdelazizMoustafa10m/orchcore/commit/147229700c44df204e33bd44e950f028220f79be))
|
|
12
|
+
* implement phase 2 orchestration modules ([656c26a](https://github.com/AbdelazizMoustafa10m/orchcore/commit/656c26ab22bccac0d1c3cadc587d29ab2d2086d0))
|
|
13
|
+
* scaffold orchcore project structure (Phase 0) ([c15bc49](https://github.com/AbdelazizMoustafa10m/orchcore/commit/c15bc49e80e3ed1f034e5659964da37224965e04))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* add explicit type annotations to reach 100% pyright verifytypes score ([8f8cead](https://github.com/AbdelazizMoustafa10m/orchcore/commit/8f8cead52d083fa9a7144e29d34ddaead3cfa44c))
|
|
19
|
+
* add py.typed marker and use uv in Makefile ([ee6b0d0](https://github.com/AbdelazizMoustafa10m/orchcore/commit/ee6b0d0feed3123f873e5bc72c50453e33360f53))
|
|
20
|
+
* **ci:** install dev extras in CI workflow ([4c95321](https://github.com/AbdelazizMoustafa10m/orchcore/commit/4c95321894068cee83bce9ce7e6a3b585666ef7a))
|
|
21
|
+
* **ci:** update codeql-action to v3.35.1 in scorecards workflow ([38395fe](https://github.com/AbdelazizMoustafa10m/orchcore/commit/38395fef73fa2b57807d6edbc5982b35a8b583eb))
|
|
22
|
+
* resolve 10 audit findings across stream, pipeline, workspace, and registry modules ([2f5789b](https://github.com/AbdelazizMoustafa10m/orchcore/commit/2f5789b827650e6e91fdaad5a4898ec1e4947978))
|
|
23
|
+
* resolve 15 audit findings across pipeline, stream, runner, and config modules ([5ac8c08](https://github.com/AbdelazizMoustafa10m/orchcore/commit/5ac8c0807156c045c03eaf241d9018f10843019c))
|
|
24
|
+
* resolve 21 audit findings across source and test modules ([2729424](https://github.com/AbdelazizMoustafa10m/orchcore/commit/272942401e5db72502150e472398439c5e6085b2))
|
|
25
|
+
* resolve 50 audit findings across all orchcore modules ([aca114d](https://github.com/AbdelazizMoustafa10m/orchcore/commit/aca114dc8d3072f67ffeebf3a4996df4efc2aa78))
|
|
26
|
+
* **tests:** make integration and template tests cross-platform ([5e83ae7](https://github.com/AbdelazizMoustafa10m/orchcore/commit/5e83ae72686c152d03c37497aa0c6d9e0c22c602))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Documentation
|
|
30
|
+
|
|
31
|
+
* add CI, release, and PyPI badges to README ([0da542c](https://github.com/AbdelazizMoustafa10m/orchcore/commit/0da542cff0227d46d3f14f920b32687ce4567ac7))
|
|
32
|
+
* add project documentation site and lean README ([09626eb](https://github.com/AbdelazizMoustafa10m/orchcore/commit/09626eb3c08c58d5d30a8e22697b17de7d1906e7))
|
|
33
|
+
* fix 10 audit findings and add 5 missing module guides ([c09a74f](https://github.com/AbdelazizMoustafa10m/orchcore/commit/c09a74fbb4ac02e35c9dd06352734ee61a42aa80))
|
|
34
|
+
* fix 16 remaining documentation inaccuracies across doc/ and docs/ ([147fa5a](https://github.com/AbdelazizMoustafa10m/orchcore/commit/147fa5a17c1444c3a4a7b659ed4afbcc3d3a8d99))
|
|
35
|
+
* fix 5 remaining inaccuracies in guides ([af52fe9](https://github.com/AbdelazizMoustafa10m/orchcore/commit/af52fe95858d89bfe0d626d8830397fc2a681050))
|
|
36
|
+
* fix SignalManager description to match implementation ([c536532](https://github.com/AbdelazizMoustafa10m/orchcore/commit/c536532ca3a9f1a7f8564af6a72039edfebfec74))
|
|
37
|
+
* sync stream parser documentation ([e8991d1](https://github.com/AbdelazizMoustafa10m/orchcore/commit/e8991d131802d13d7e37848ec245408b93e33fee))
|
|
38
|
+
* sync telemetry extra guidance ([0aa047e](https://github.com/AbdelazizMoustafa10m/orchcore/commit/0aa047e2a032d87ac8ec61ce4149030c4c85bdb3))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Build System
|
|
42
|
+
|
|
43
|
+
* add pyright verifytypes for public API type completeness checks ([400f031](https://github.com/AbdelazizMoustafa10m/orchcore/commit/400f03198118fab7cbcc735d9e98188b01cd2fa3))
|
|
44
|
+
* switch to git-tag-based versioning via hatch-vcs ([221bf9d](https://github.com/AbdelazizMoustafa10m/orchcore/commit/221bf9d91b1b0a5197d2ff45610597299ef13ce7))
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### CI/CD
|
|
48
|
+
|
|
49
|
+
* add automated releases with release-please and commit linting ([8ebfb7d](https://github.com/AbdelazizMoustafa10m/orchcore/commit/8ebfb7dc1b1c1812e25735421382f715132e50b1))
|
|
50
|
+
* add automatic GitHub Release creation on publish ([632d88d](https://github.com/AbdelazizMoustafa10m/orchcore/commit/632d88dc66fe11730a8578dc401c0655acfdbb25))
|
|
51
|
+
* add GitHub Actions workflows for CI and PyPI publishing ([60648de](https://github.com/AbdelazizMoustafa10m/orchcore/commit/60648de1c648805acca08641c45c1eec0398ebdd))
|
|
52
|
+
* remove unnecessary Test PyPI workflow ([df2894a](https://github.com/AbdelazizMoustafa10m/orchcore/commit/df2894a1b17f5e3b91210051ab804b32b3a690a9))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Tests
|
|
56
|
+
|
|
57
|
+
* add Hypothesis coverage for stream parsers ([5809e97](https://github.com/AbdelazizMoustafa10m/orchcore/commit/5809e976342792242e6b3db60c14f9bce2fc8874))
|
|
58
|
+
|
|
59
|
+
## Changelog
|
|
60
|
+
|
|
61
|
+
All notable changes to this project will be documented in this file.
|
|
62
|
+
|
|
63
|
+
This changelog is automatically generated by
|
|
64
|
+
[release-please](https://github.com/googleapis/release-please) from
|
|
65
|
+
[conventional commits](https://www.conventionalcommits.org/).
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and maintainers pledge to make participation in the orchcore
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body size, visible or
|
|
7
|
+
invisible disability, ethnicity, sex characteristics, gender identity and expression, level of
|
|
8
|
+
experience, education, socio-economic status, nationality, personal appearance, race, religion,
|
|
9
|
+
or sexual identity and orientation.
|
|
10
|
+
|
|
11
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive,
|
|
12
|
+
and healthy community.
|
|
13
|
+
|
|
14
|
+
## Our Standards
|
|
15
|
+
|
|
16
|
+
Examples of behavior that contributes to a positive environment for this community include:
|
|
17
|
+
|
|
18
|
+
- Demonstrating empathy and kindness toward other people
|
|
19
|
+
- Being respectful of differing opinions, viewpoints, and experiences
|
|
20
|
+
- Giving and gracefully accepting constructive feedback
|
|
21
|
+
- Taking responsibility, apologizing to those affected by our mistakes, and learning from the
|
|
22
|
+
experience
|
|
23
|
+
- Focusing on what is best not just for us as individuals, but for the overall community
|
|
24
|
+
|
|
25
|
+
Examples of unacceptable behavior include:
|
|
26
|
+
|
|
27
|
+
- The use of sexualized language or imagery, and sexual attention or advances of any kind
|
|
28
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
29
|
+
- Public or private harassment
|
|
30
|
+
- Publishing others' private information, such as a physical or email address, without their
|
|
31
|
+
explicit permission
|
|
32
|
+
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
33
|
+
|
|
34
|
+
## Enforcement Responsibilities
|
|
35
|
+
|
|
36
|
+
Project maintainers are responsible for clarifying and enforcing our standards of acceptable
|
|
37
|
+
behavior and will take appropriate and fair corrective action in response to any behavior that
|
|
38
|
+
they deem inappropriate, threatening, offensive, or harmful.
|
|
39
|
+
|
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits,
|
|
41
|
+
code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct,
|
|
42
|
+
and will communicate reasons for moderation decisions when appropriate.
|
|
43
|
+
|
|
44
|
+
## Scope
|
|
45
|
+
|
|
46
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is
|
|
47
|
+
officially representing the community in public spaces. Examples of representing our community
|
|
48
|
+
include using an official project email address, posting via an official social media account, or
|
|
49
|
+
acting as an appointed representative at an online or offline event.
|
|
50
|
+
|
|
51
|
+
## Enforcement
|
|
52
|
+
|
|
53
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project
|
|
54
|
+
maintainer using a private contact method listed on the repository owner profile. All complaints
|
|
55
|
+
will be reviewed and investigated promptly and fairly.
|
|
56
|
+
|
|
57
|
+
All maintainers are obligated to respect the privacy and security of the reporter of any incident.
|
|
58
|
+
|
|
59
|
+
## Enforcement Guidelines
|
|
60
|
+
|
|
61
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for
|
|
62
|
+
any action they deem in violation of this Code of Conduct:
|
|
63
|
+
|
|
64
|
+
### 1. Correction
|
|
65
|
+
|
|
66
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or
|
|
67
|
+
unwelcome in the community.
|
|
68
|
+
|
|
69
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the
|
|
70
|
+
nature of the violation and an explanation of why the behavior was inappropriate. A public apology
|
|
71
|
+
may be requested.
|
|
72
|
+
|
|
73
|
+
### 2. Warning
|
|
74
|
+
|
|
75
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
|
76
|
+
|
|
77
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people
|
|
78
|
+
involved, including unsolicited interaction with those enforcing the Code of Conduct, for a
|
|
79
|
+
specified period of time. This includes avoiding interactions in community spaces as well as
|
|
80
|
+
external channels like social media. Violating these terms may lead to a temporary or permanent
|
|
81
|
+
ban.
|
|
82
|
+
|
|
83
|
+
### 3. Temporary Ban
|
|
84
|
+
|
|
85
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate
|
|
86
|
+
behavior.
|
|
87
|
+
|
|
88
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the
|
|
89
|
+
community for a specified period of time. No public or private interaction with the people
|
|
90
|
+
involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed
|
|
91
|
+
during this period. Violating these terms may lead to a permanent ban.
|
|
92
|
+
|
|
93
|
+
### 4. Permanent Ban
|
|
94
|
+
|
|
95
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including
|
|
96
|
+
sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement
|
|
97
|
+
of classes of individuals.
|
|
98
|
+
|
|
99
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
|
100
|
+
|
|
101
|
+
## Attribution
|
|
102
|
+
|
|
103
|
+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/),
|
|
104
|
+
version 2.1, available at
|
|
105
|
+
[contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).
|
|
106
|
+
|
|
107
|
+
Community Impact Guidelines were inspired by
|
|
108
|
+
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Contributing to orchcore
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to orchcore!
|
|
4
|
+
|
|
5
|
+
For the full contributing guide covering development setup, commands, testing, code standards,
|
|
6
|
+
and pull request expectations, see
|
|
7
|
+
[doc/development/contributing.md](doc/development/contributing.md).
|
|
8
|
+
|
|
9
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
git clone https://github.com/AbdelazizMoustafa10m/orchcore.git
|
|
13
|
+
cd orchcore
|
|
14
|
+
uv pip install -e ".[dev]"
|
|
15
|
+
make check # lint + typecheck + test; must pass before submitting
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Commit Convention
|
|
19
|
+
|
|
20
|
+
This project uses [Conventional Commits](https://www.conventionalcommits.org/). Pull request
|
|
21
|
+
titles are validated automatically in CI.
|
|
22
|
+
|
|
23
|
+
## Code of Conduct
|
|
24
|
+
|
|
25
|
+
This project follows the [Contributor Covenant Code of Conduct](CODE_OF_CONDUCT.md).
|
|
26
|
+
|
|
27
|
+
## Security
|
|
28
|
+
|
|
29
|
+
Please report security issues privately as described in [SECURITY.md](SECURITY.md).
|
orchcore-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026-present Abdelaziz Abdelrasol
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
orchcore-0.1.0/Makefile
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.PHONY: install lint typecheck test check clean verifytypes
|
|
2
|
+
|
|
3
|
+
install:
|
|
4
|
+
uv pip install -e ".[dev]"
|
|
5
|
+
|
|
6
|
+
lint:
|
|
7
|
+
ruff check src/ tests/
|
|
8
|
+
ruff format --check src/ tests/
|
|
9
|
+
|
|
10
|
+
format:
|
|
11
|
+
ruff format src/ tests/
|
|
12
|
+
ruff check --fix src/ tests/
|
|
13
|
+
|
|
14
|
+
typecheck:
|
|
15
|
+
mypy src/orchcore/ --strict
|
|
16
|
+
|
|
17
|
+
test:
|
|
18
|
+
pytest tests/ -v
|
|
19
|
+
|
|
20
|
+
check: lint typecheck test
|
|
21
|
+
@echo "All checks passed."
|
|
22
|
+
|
|
23
|
+
verifytypes:
|
|
24
|
+
uv run pyright --verifytypes orchcore --ignoreexternal
|
|
25
|
+
|
|
26
|
+
clean:
|
|
27
|
+
find . -type d -name __pycache__ -exec rm -rf {} +
|
|
28
|
+
find . -type d -name .mypy_cache -exec rm -rf {} +
|
|
29
|
+
find . -type d -name .pytest_cache -exec rm -rf {} +
|
|
30
|
+
rm -rf dist/ build/ *.egg-info
|
orchcore-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: orchcore
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Reusable orchestration core for AI coding agent CLI pipelines
|
|
5
|
+
Project-URL: Homepage, https://github.com/AbdelazizMoustafa10m/orchcore
|
|
6
|
+
Project-URL: Repository, https://github.com/AbdelazizMoustafa10m/orchcore
|
|
7
|
+
Project-URL: Documentation, https://abdelazizmoustafa10m.github.io/orchcore
|
|
8
|
+
Project-URL: Issues, https://github.com/AbdelazizMoustafa10m/orchcore/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/AbdelazizMoustafa10m/orchcore/blob/main/CHANGELOG.md
|
|
10
|
+
Author: Abdelaziz Abdelrasol
|
|
11
|
+
License-Expression: MIT
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Framework :: AsyncIO
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
23
|
+
Classifier: Typing :: Typed
|
|
24
|
+
Requires-Python: >=3.12
|
|
25
|
+
Requires-Dist: jinja2>=3.1
|
|
26
|
+
Requires-Dist: pydantic-settings>=2.7
|
|
27
|
+
Requires-Dist: pydantic>=2.10
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: commitizen>=3.29; extra == 'dev'
|
|
30
|
+
Requires-Dist: coverage>=7.0; extra == 'dev'
|
|
31
|
+
Requires-Dist: hypothesis>=6.100; extra == 'dev'
|
|
32
|
+
Requires-Dist: mypy>=1.13; extra == 'dev'
|
|
33
|
+
Requires-Dist: pre-commit>=4.0; extra == 'dev'
|
|
34
|
+
Requires-Dist: pyright>=1.1; extra == 'dev'
|
|
35
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
|
|
36
|
+
Requires-Dist: pytest-cov>=6.0; extra == 'dev'
|
|
37
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
38
|
+
Requires-Dist: ruff>=0.8; extra == 'dev'
|
|
39
|
+
Provides-Extra: rich
|
|
40
|
+
Requires-Dist: rich>=13.0; extra == 'rich'
|
|
41
|
+
Provides-Extra: telemetry
|
|
42
|
+
Requires-Dist: opentelemetry-api>=1.29; extra == 'telemetry'
|
|
43
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.29; extra == 'telemetry'
|
|
44
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.29; extra == 'telemetry'
|
|
45
|
+
Requires-Dist: opentelemetry-sdk>=1.29; extra == 'telemetry'
|
|
46
|
+
Provides-Extra: tui
|
|
47
|
+
Requires-Dist: textual>=0.40; extra == 'tui'
|
|
48
|
+
Description-Content-Type: text/markdown
|
|
49
|
+
|
|
50
|
+
# orchcore
|
|
51
|
+
|
|
52
|
+
> Reusable orchestration core for AI coding agent CLI pipelines.
|
|
53
|
+
|
|
54
|
+
[](https://github.com/AbdelazizMoustafa10m/orchcore/actions/workflows/ci.yml)
|
|
55
|
+
[](https://github.com/AbdelazizMoustafa10m/orchcore/releases)
|
|
56
|
+
[](https://pypi.org/project/orchcore/)
|
|
57
|
+
[](https://www.python.org/downloads/)
|
|
58
|
+
[](LICENSE)
|
|
59
|
+
[](https://scorecard.dev/viewer/?uri=github.com/AbdelazizMoustafa10m/orchcore)
|
|
60
|
+
[](https://mypy-lang.org/)
|
|
61
|
+
[](https://docs.astral.sh/ruff/)
|
|
62
|
+
[](https://codecov.io/gh/AbdelazizMoustafa10m/orchcore)
|
|
63
|
+
|
|
64
|
+
## What is orchcore?
|
|
65
|
+
|
|
66
|
+
orchcore is an async-first Python 3.12+ library that provides unified infrastructure for launching, monitoring, and managing multiple AI coding agent CLIs (Claude, Codex, Gemini, Copilot, OpenCode) as subprocesses through phase-based pipelines. It was extracted from four production orchestration systems — Planora, Articles, Finvault, and Raven — eliminating 60-70% of duplicated infrastructure so consuming projects only implement domain-specific logic.
|
|
67
|
+
|
|
68
|
+
## Features
|
|
69
|
+
|
|
70
|
+
- **Multi-agent subprocess orchestration** — async launch, stream capture, concurrency control
|
|
71
|
+
- **Unified stream processing** — 4-stage pipeline normalizes 5 JSONL formats into a single `StreamEvent` model
|
|
72
|
+
- **DAG-based phase pipelines** — sequential/parallel execution with dependency ordering and resume
|
|
73
|
+
- **Rate-limit recovery** — automatic detection, timezone-aware reset parsing, exponential backoff
|
|
74
|
+
- **Layered configuration** — TOML files, env vars, CLI overrides, named profiles
|
|
75
|
+
- **Protocol-based UI** — `UICallback` decouples engine from display (Rich, Textual, headless)
|
|
76
|
+
- **Registry-as-data** — new agent support via TOML config alone, zero code changes
|
|
77
|
+
- **Graceful shutdown** — SIGINT/SIGTERM with subprocess cleanup and state preservation
|
|
78
|
+
|
|
79
|
+
## Installation
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
uv pip install orchcore
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
From source:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
git clone https://github.com/AbdelazizMoustafa10m/orchcore.git
|
|
89
|
+
cd orchcore
|
|
90
|
+
uv pip install -e ".[dev]"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Requirements:** Python 3.12+
|
|
94
|
+
|
|
95
|
+
## Quick Start
|
|
96
|
+
|
|
97
|
+
### 1. Define Agents
|
|
98
|
+
|
|
99
|
+
```toml
|
|
100
|
+
# agents.toml
|
|
101
|
+
[agents.claude]
|
|
102
|
+
binary = "claude"
|
|
103
|
+
model = "claude-sonnet-4-20250514"
|
|
104
|
+
subcommand = "-p"
|
|
105
|
+
stream_format = "claude"
|
|
106
|
+
|
|
107
|
+
[agents.claude.flags]
|
|
108
|
+
plan = ["--think", "--verbose"]
|
|
109
|
+
|
|
110
|
+
[agents.claude.output_extraction]
|
|
111
|
+
strategy = "jq_filter"
|
|
112
|
+
jq_expression = ".content[0].text"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### 2. Run a Pipeline
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
import asyncio
|
|
119
|
+
from pathlib import Path
|
|
120
|
+
from orchcore.pipeline import PipelineRunner, PhaseRunner, Phase
|
|
121
|
+
from orchcore.registry import AgentRegistry, AgentMode, ToolSet
|
|
122
|
+
from orchcore.runner import AgentRunner
|
|
123
|
+
from orchcore.ui import NullCallback
|
|
124
|
+
|
|
125
|
+
async def main() -> None:
|
|
126
|
+
registry = AgentRegistry()
|
|
127
|
+
registry.load_from_toml(Path("agents.toml"))
|
|
128
|
+
|
|
129
|
+
phase = Phase(
|
|
130
|
+
name="planning",
|
|
131
|
+
agents=["claude"],
|
|
132
|
+
tools=ToolSet(internal=["Read", "Glob", "Grep"], permission="read-only"),
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
runner = AgentRunner()
|
|
136
|
+
phase_runner = PhaseRunner(runner, registry, max_concurrency=4)
|
|
137
|
+
pipeline = PipelineRunner(phase_runner)
|
|
138
|
+
|
|
139
|
+
result = await pipeline.run_pipeline(
|
|
140
|
+
phases=[phase],
|
|
141
|
+
prompts={"planning": "Analyze the codebase and create a plan."},
|
|
142
|
+
ui_callback=NullCallback(),
|
|
143
|
+
mode=AgentMode.PLAN,
|
|
144
|
+
)
|
|
145
|
+
print(f"Success: {result.success} | Cost: ${result.total_cost_usd}")
|
|
146
|
+
|
|
147
|
+
asyncio.run(main())
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Modules
|
|
151
|
+
|
|
152
|
+
| Module | Purpose |
|
|
153
|
+
|--------|---------|
|
|
154
|
+
| `stream/` | 4-stage pipeline (Filter → Parse → Monitor → Stall Detect) for 5 agent formats |
|
|
155
|
+
| `pipeline/` | DAG-based phase orchestration — sequential/parallel multi-agent execution |
|
|
156
|
+
| `runner/` | Async subprocess management with stdin/stdout/stderr piping |
|
|
157
|
+
| `registry/` | Agent configurations as data (TOML/dict) with runtime lookup |
|
|
158
|
+
| `config/` | Layered configuration: TOML → env vars → CLI overrides → profiles |
|
|
159
|
+
| `recovery/` | Rate-limit detection, exponential backoff, git dirty-tree recovery |
|
|
160
|
+
| `workspace/` | Artifact lifecycle management |
|
|
161
|
+
| `prompt/` | Jinja2 template rendering with frontmatter stripping |
|
|
162
|
+
| `ui/` | `UICallback` protocol for pluggable display layers |
|
|
163
|
+
| `signals/` | Graceful SIGINT/SIGTERM shutdown |
|
|
164
|
+
| `display/` | Colored stderr logging (no Rich dependency in core) |
|
|
165
|
+
| `observability/` | Optional OpenTelemetry integration |
|
|
166
|
+
|
|
167
|
+
## Documentation
|
|
168
|
+
|
|
169
|
+
Full documentation is available at **[abdelazizmoustafa10m.github.io/orchcore](https://abdelazizmoustafa10m.github.io/orchcore/)**.
|
|
170
|
+
|
|
171
|
+
| Document | Description |
|
|
172
|
+
|----------|-------------|
|
|
173
|
+
| [Installation](doc/getting-started/installation.md) | Prerequisites, install options, extras |
|
|
174
|
+
| [Quick Start](doc/getting-started/quickstart.md) | Define agents, build phases, run pipelines |
|
|
175
|
+
| [Configuration Reference](doc/reference/configuration.md) | Full settings table, profiles, env vars |
|
|
176
|
+
| [Stream Events Reference](doc/reference/stream-events.md) | StreamEvent fields, types, agent states |
|
|
177
|
+
| [UICallback Reference](doc/reference/ui-callback.md) | Protocol methods and built-in implementations |
|
|
178
|
+
| [Architecture](doc/architecture/overview.md) | Package layout, core abstractions, design decisions |
|
|
179
|
+
| [Stream Pipeline](doc/architecture/stream-pipeline.md) | 4-stage composable pipeline deep-dive |
|
|
180
|
+
| [Design Document](doc/architecture/design.md) | Problem statement, requirements, proposed design |
|
|
181
|
+
| [Writing a UICallback](doc/guides/writing-a-uicallback.md) | Build custom display layers |
|
|
182
|
+
| [Agent Registry](doc/guides/agent-registry.md) | TOML config, adding new agents, ToolSets |
|
|
183
|
+
| [Recovery & Retry](doc/guides/recovery-and-retry.md) | Rate limits, backoff, failure modes |
|
|
184
|
+
| [Contributing](doc/development/contributing.md) | Dev setup, code standards, testing |
|
|
185
|
+
|
|
186
|
+
## Contributing
|
|
187
|
+
|
|
188
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, testing instructions, and code standards.
|
|
189
|
+
|
|
190
|
+
Please also review [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) and [SECURITY.md](SECURITY.md).
|
|
191
|
+
|
|
192
|
+
## License
|
|
193
|
+
|
|
194
|
+
orchcore is released under the [MIT License](LICENSE).
|