corpai 0.4.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.
@@ -0,0 +1,19 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ id-token: write
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: actions/setup-python@v5
15
+ with:
16
+ python-version: "3.11"
17
+ - run: pip install hatchling build
18
+ - run: python -m build
19
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,20 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main, master]
6
+ pull_request:
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ python-version: ["3.9", "3.10", "3.11", "3.12"]
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: actions/setup-python@v5
17
+ with:
18
+ python-version: ${{ matrix.python-version }}
19
+ - run: pip install -e ".[dev]" pytest
20
+ - run: pytest tests/ -v
@@ -0,0 +1,5 @@
1
+ *.pyc
2
+ __pycache__/
3
+ *.egg-info/
4
+ dist/
5
+ .pytest_cache/
corpai-0.4.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ari (Arigitshub)
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.
corpai-0.4.0/PKG-INFO ADDED
@@ -0,0 +1,182 @@
1
+ Metadata-Version: 2.4
2
+ Name: corpai
3
+ Version: 0.4.0
4
+ Summary: CLI validator and tooling for the CorpAI open standard
5
+ Project-URL: Homepage, https://github.com/Arigitshub/CorpAI
6
+ Project-URL: Repository, https://github.com/Arigitshub/corpai-cli
7
+ Project-URL: Bug Tracker, https://github.com/Arigitshub/corpai-cli/issues
8
+ Author-email: Ari <ari532477@gmail.com>
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: agents,ai,cli,corpai,multi-agent,validator
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Software Development :: Libraries
21
+ Classifier: Topic :: Utilities
22
+ Requires-Python: >=3.9
23
+ Requires-Dist: rich>=13.0.0
24
+ Requires-Dist: typer>=0.12.0
25
+ Description-Content-Type: text/markdown
26
+
27
+ # corpai-cli
28
+
29
+ > The official CLI for the [CorpAI open standard](https://github.com/Arigitshub/CorpAI) — validate, visualize, and simulate your AI agent org.
30
+
31
+ [![PyPI version](https://img.shields.io/pypi/v/corpai?style=flat-square)](https://pypi.org/project/corpai/)
32
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue?style=flat-square)](https://pypi.org/project/corpai/)
33
+ [![MIT License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](LICENSE)
34
+ [![CorpAI Compatible](https://img.shields.io/badge/CorpAI-Compatible-0a0a0a?style=flat-square)](https://github.com/Arigitshub/CorpAI)
35
+
36
+ ---
37
+
38
+ ## Install
39
+
40
+ ```bash
41
+ pip install corpai
42
+ ```
43
+
44
+ ---
45
+
46
+ ## Commands
47
+
48
+ ### `corpai lint` — Validate your role files
49
+
50
+ Checks every role `.md` file against the CorpAI spec:
51
+ - Missing required sections
52
+ - Invalid or missing rank badges
53
+ - Empty fields and template placeholders
54
+ - Broken reporting chains (reports-to role doesn't exist)
55
+ - Missing escalation triggers
56
+
57
+ ```bash
58
+ # Lint entire org
59
+ corpai lint
60
+
61
+ # Lint a specific directory
62
+ corpai lint ./my-corpai-org
63
+
64
+ # Lint a single file
65
+ corpai lint --file roles/executive/ceo.md
66
+
67
+ # Treat warnings as errors (strict mode)
68
+ corpai lint --strict
69
+ ```
70
+
71
+ Example output:
72
+ ```
73
+ ✓ ceo.md
74
+ ✓ cto.md
75
+ ⚠ engineer.md
76
+ WARN No optional personality template found
77
+ ✗ custom-role.md
78
+ ERROR Missing required section: ## Escalation Triggers
79
+ ERROR "Reports to" field is empty
80
+
81
+ ──────────────────────────────
82
+ 42 roles checked — 1 error(s), 3 warning(s)
83
+ ```
84
+
85
+ ---
86
+
87
+ ### `corpai graph` — Generate org charts
88
+
89
+ Visualize your agent hierarchy as an ASCII tree or Mermaid diagram.
90
+
91
+ ```bash
92
+ # ASCII tree (default)
93
+ corpai graph
94
+
95
+ # Mermaid diagram
96
+ corpai graph --format mermaid
97
+
98
+ # Filter to one department
99
+ corpai graph --dept engineering
100
+
101
+ # Save to file
102
+ corpai graph --format mermaid --output org.mmd
103
+ ```
104
+
105
+ Example ASCII output:
106
+ ```
107
+ └── [OWNER] OWNER (executive)
108
+ └── [L5] CEO (executive)
109
+ ├── [L5] CFO (executive)
110
+ │ └── [L4] Finance Director (finance)
111
+ │ ├── [L2] Financial Analyst (finance)
112
+ │ └── [L2] Auditor (finance)
113
+ └── [L5] CTO (executive)
114
+ └── [L4] Engineering Director (engineering)
115
+ └── [L3] Engineering Team Lead (engineering)
116
+ ```
117
+
118
+ ---
119
+
120
+ ### `corpai simulate` — Simulate message flows
121
+
122
+ Trace exactly how a TASK or ESCALATION travels through your hierarchy.
123
+
124
+ ```bash
125
+ # Simulate a task flowing from CEO to Engineer
126
+ corpai simulate --from CEO --to Engineer --subject "Build auth module" --priority P2
127
+
128
+ # Simulate an escalation from L1 up to CEO
129
+ corpai simulate --from "Support Agent" --to CEO --priority P1
130
+ ```
131
+
132
+ Example output:
133
+ ```
134
+ ╭─ CorpAI Message Simulation ───────────────────────╮
135
+ │ Subject: Build auth module │
136
+ │ Type: ↓ TASK │
137
+ │ Priority: P2 │
138
+ │ Hops: 4 │
139
+ ╰────────────────────────────────────────────────────╯
140
+
141
+ Step 1 [L5] CEO ↓ TASK [L5] CTO
142
+ Step 2 [L5] CTO ↓ TASK [L4] Engineering Director
143
+ Step 3 [L4] Engineering Director ↓ TASK [L3] Engineering Team Lead
144
+ Step 4 [L3] Engineering Team Lead ↓ TASK [L1] Engineer
145
+
146
+ ✓ Message delivered to [L1] Engineer
147
+ ```
148
+
149
+ ---
150
+
151
+ ### `corpai info` — Org summary
152
+
153
+ ```bash
154
+ corpai info
155
+ ```
156
+
157
+ Shows role counts, departments, and rank distribution across your org.
158
+
159
+ ---
160
+
161
+ ## Usage with CorpAI spec repo
162
+
163
+ ```bash
164
+ git clone https://github.com/Arigitshub/CorpAI
165
+ cd CorpAI
166
+ pip install corpai
167
+
168
+ # Validate the full spec
169
+ corpai lint
170
+
171
+ # View the org
172
+ corpai graph
173
+
174
+ # Simulate a task
175
+ corpai simulate --from CEO --to "QA Tester" --subject "Test the release"
176
+ ```
177
+
178
+ ---
179
+
180
+ ## Contributing
181
+
182
+ Issues and PRs welcome at [Arigitshub/corpai-cli](https://github.com/Arigitshub/corpai-cli).
corpai-0.4.0/README.md ADDED
@@ -0,0 +1,156 @@
1
+ # corpai-cli
2
+
3
+ > The official CLI for the [CorpAI open standard](https://github.com/Arigitshub/CorpAI) — validate, visualize, and simulate your AI agent org.
4
+
5
+ [![PyPI version](https://img.shields.io/pypi/v/corpai?style=flat-square)](https://pypi.org/project/corpai/)
6
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue?style=flat-square)](https://pypi.org/project/corpai/)
7
+ [![MIT License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](LICENSE)
8
+ [![CorpAI Compatible](https://img.shields.io/badge/CorpAI-Compatible-0a0a0a?style=flat-square)](https://github.com/Arigitshub/CorpAI)
9
+
10
+ ---
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ pip install corpai
16
+ ```
17
+
18
+ ---
19
+
20
+ ## Commands
21
+
22
+ ### `corpai lint` — Validate your role files
23
+
24
+ Checks every role `.md` file against the CorpAI spec:
25
+ - Missing required sections
26
+ - Invalid or missing rank badges
27
+ - Empty fields and template placeholders
28
+ - Broken reporting chains (reports-to role doesn't exist)
29
+ - Missing escalation triggers
30
+
31
+ ```bash
32
+ # Lint entire org
33
+ corpai lint
34
+
35
+ # Lint a specific directory
36
+ corpai lint ./my-corpai-org
37
+
38
+ # Lint a single file
39
+ corpai lint --file roles/executive/ceo.md
40
+
41
+ # Treat warnings as errors (strict mode)
42
+ corpai lint --strict
43
+ ```
44
+
45
+ Example output:
46
+ ```
47
+ ✓ ceo.md
48
+ ✓ cto.md
49
+ ⚠ engineer.md
50
+ WARN No optional personality template found
51
+ ✗ custom-role.md
52
+ ERROR Missing required section: ## Escalation Triggers
53
+ ERROR "Reports to" field is empty
54
+
55
+ ──────────────────────────────
56
+ 42 roles checked — 1 error(s), 3 warning(s)
57
+ ```
58
+
59
+ ---
60
+
61
+ ### `corpai graph` — Generate org charts
62
+
63
+ Visualize your agent hierarchy as an ASCII tree or Mermaid diagram.
64
+
65
+ ```bash
66
+ # ASCII tree (default)
67
+ corpai graph
68
+
69
+ # Mermaid diagram
70
+ corpai graph --format mermaid
71
+
72
+ # Filter to one department
73
+ corpai graph --dept engineering
74
+
75
+ # Save to file
76
+ corpai graph --format mermaid --output org.mmd
77
+ ```
78
+
79
+ Example ASCII output:
80
+ ```
81
+ └── [OWNER] OWNER (executive)
82
+ └── [L5] CEO (executive)
83
+ ├── [L5] CFO (executive)
84
+ │ └── [L4] Finance Director (finance)
85
+ │ ├── [L2] Financial Analyst (finance)
86
+ │ └── [L2] Auditor (finance)
87
+ └── [L5] CTO (executive)
88
+ └── [L4] Engineering Director (engineering)
89
+ └── [L3] Engineering Team Lead (engineering)
90
+ ```
91
+
92
+ ---
93
+
94
+ ### `corpai simulate` — Simulate message flows
95
+
96
+ Trace exactly how a TASK or ESCALATION travels through your hierarchy.
97
+
98
+ ```bash
99
+ # Simulate a task flowing from CEO to Engineer
100
+ corpai simulate --from CEO --to Engineer --subject "Build auth module" --priority P2
101
+
102
+ # Simulate an escalation from L1 up to CEO
103
+ corpai simulate --from "Support Agent" --to CEO --priority P1
104
+ ```
105
+
106
+ Example output:
107
+ ```
108
+ ╭─ CorpAI Message Simulation ───────────────────────╮
109
+ │ Subject: Build auth module │
110
+ │ Type: ↓ TASK │
111
+ │ Priority: P2 │
112
+ │ Hops: 4 │
113
+ ╰────────────────────────────────────────────────────╯
114
+
115
+ Step 1 [L5] CEO ↓ TASK [L5] CTO
116
+ Step 2 [L5] CTO ↓ TASK [L4] Engineering Director
117
+ Step 3 [L4] Engineering Director ↓ TASK [L3] Engineering Team Lead
118
+ Step 4 [L3] Engineering Team Lead ↓ TASK [L1] Engineer
119
+
120
+ ✓ Message delivered to [L1] Engineer
121
+ ```
122
+
123
+ ---
124
+
125
+ ### `corpai info` — Org summary
126
+
127
+ ```bash
128
+ corpai info
129
+ ```
130
+
131
+ Shows role counts, departments, and rank distribution across your org.
132
+
133
+ ---
134
+
135
+ ## Usage with CorpAI spec repo
136
+
137
+ ```bash
138
+ git clone https://github.com/Arigitshub/CorpAI
139
+ cd CorpAI
140
+ pip install corpai
141
+
142
+ # Validate the full spec
143
+ corpai lint
144
+
145
+ # View the org
146
+ corpai graph
147
+
148
+ # Simulate a task
149
+ corpai simulate --from CEO --to "QA Tester" --subject "Test the release"
150
+ ```
151
+
152
+ ---
153
+
154
+ ## Contributing
155
+
156
+ Issues and PRs welcome at [Arigitshub/corpai-cli](https://github.com/Arigitshub/corpai-cli).
@@ -0,0 +1,40 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "corpai"
7
+ version = "0.4.0"
8
+ description = "CLI validator and tooling for the CorpAI open standard"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ authors = [{ name = "Ari", email = "ari532477@gmail.com" }]
12
+ keywords = ["ai", "agents", "corpai", "cli", "validator", "multi-agent"]
13
+ classifiers = [
14
+ "Development Status :: 4 - Beta",
15
+ "Intended Audience :: Developers",
16
+ "License :: OSI Approved :: MIT License",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.9",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Topic :: Software Development :: Libraries",
23
+ "Topic :: Utilities",
24
+ ]
25
+ requires-python = ">=3.9"
26
+ dependencies = [
27
+ "typer>=0.12.0",
28
+ "rich>=13.0.0",
29
+ ]
30
+
31
+ [project.scripts]
32
+ corpai = "corpai.cli:app"
33
+
34
+ [project.urls]
35
+ Homepage = "https://github.com/Arigitshub/CorpAI"
36
+ Repository = "https://github.com/Arigitshub/corpai-cli"
37
+ "Bug Tracker" = "https://github.com/Arigitshub/corpai-cli/issues"
38
+
39
+ [tool.hatch.build.targets.wheel]
40
+ packages = ["src/corpai"]
@@ -0,0 +1,3 @@
1
+ """CorpAI CLI — validator and tooling for the CorpAI open standard."""
2
+
3
+ __version__ = "0.4.0"