aicortexpy 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.
- aicortexpy-0.1.0/MANIFEST.in +4 -0
- aicortexpy-0.1.0/PKG-INFO +106 -0
- aicortexpy-0.1.0/README.md +89 -0
- aicortexpy-0.1.0/aicortexpy/__init__.py +3 -0
- aicortexpy-0.1.0/aicortexpy/__main__.py +5 -0
- aicortexpy-0.1.0/aicortexpy/acp_client.py +559 -0
- aicortexpy-0.1.0/aicortexpy/acp_conn.py +853 -0
- aicortexpy-0.1.0/aicortexpy/acp_errors.py +107 -0
- aicortexpy-0.1.0/aicortexpy/agent_env.py +88 -0
- aicortexpy-0.1.0/aicortexpy/artifact_ws.py +233 -0
- aicortexpy-0.1.0/aicortexpy/artifacts.py +67 -0
- aicortexpy-0.1.0/aicortexpy/attachments.py +85 -0
- aicortexpy-0.1.0/aicortexpy/auto_commit.py +106 -0
- aicortexpy-0.1.0/aicortexpy/capabilities.py +92 -0
- aicortexpy-0.1.0/aicortexpy/chat_acp_pool.py +321 -0
- aicortexpy-0.1.0/aicortexpy/cli.py +133 -0
- aicortexpy-0.1.0/aicortexpy/client.py +438 -0
- aicortexpy-0.1.0/aicortexpy/codex_config.py +98 -0
- aicortexpy-0.1.0/aicortexpy/config.py +298 -0
- aicortexpy-0.1.0/aicortexpy/daemon.py +677 -0
- aicortexpy-0.1.0/aicortexpy/data/default_skills/agent-memory/SKILL.md +67 -0
- aicortexpy-0.1.0/aicortexpy/data/default_skills/aicorkit-atlassian/SKILL.md +144 -0
- aicortexpy-0.1.0/aicortexpy/data/default_skills/aicorkit-graph/SKILL.md +145 -0
- aicortexpy-0.1.0/aicortexpy/data/default_skills/aicorkit-outlook/SKILL.md +87 -0
- aicortexpy-0.1.0/aicortexpy/data/default_skills/aicorkit-wxmsg/SKILL.md +96 -0
- aicortexpy-0.1.0/aicortexpy/data/default_skills/aicortex-basics/SKILL.md +10 -0
- aicortexpy-0.1.0/aicortexpy/data/default_skills/aicortex-bridge-cdp/SKILL.md +118 -0
- aicortexpy-0.1.0/aicortexpy/data/default_skills/aicortex-cli-ops/SKILL.md +100 -0
- aicortexpy-0.1.0/aicortexpy/data/default_skills/aicortex-graph/SKILL.md +30 -0
- aicortexpy-0.1.0/aicortexpy/data/default_skills/graphify/SKILL.md +97 -0
- aicortexpy-0.1.0/aicortexpy/data/default_skills/question-form/SKILL.md +162 -0
- aicortexpy-0.1.0/aicortexpy/data/default_skills/test-report-generator/SKILL.md +179 -0
- aicortexpy-0.1.0/aicortexpy/data/default_skills/test-report-generator/scripts/generate_cases.py +146 -0
- aicortexpy-0.1.0/aicortexpy/data/default_skills/test-report-generator/scripts/generate_report.py +275 -0
- aicortexpy-0.1.0/aicortexpy/design_seed.py +59 -0
- aicortexpy-0.1.0/aicortexpy/diskusage.py +209 -0
- aicortexpy-0.1.0/aicortexpy/execenv.py +264 -0
- aicortexpy-0.1.0/aicortexpy/gc.py +286 -0
- aicortexpy-0.1.0/aicortexpy/handoff_bundle.py +65 -0
- aicortexpy-0.1.0/aicortexpy/health.py +178 -0
- aicortexpy-0.1.0/aicortexpy/local_skills.py +157 -0
- aicortexpy-0.1.0/aicortexpy/models.py +385 -0
- aicortexpy-0.1.0/aicortexpy/openclaw_config.py +153 -0
- aicortexpy-0.1.0/aicortexpy/pinned_workdir.py +60 -0
- aicortexpy-0.1.0/aicortexpy/platform_info.py +61 -0
- aicortexpy-0.1.0/aicortexpy/poisoned.py +44 -0
- aicortexpy-0.1.0/aicortexpy/process.py +168 -0
- aicortexpy-0.1.0/aicortexpy/procutil.py +61 -0
- aicortexpy-0.1.0/aicortexpy/prompt.py +235 -0
- aicortexpy-0.1.0/aicortexpy/repo.py +462 -0
- aicortexpy-0.1.0/aicortexpy/runner.py +969 -0
- aicortexpy-0.1.0/aicortexpy/runtime_config.py +540 -0
- aicortexpy-0.1.0/aicortexpy/sandbox.py +264 -0
- aicortexpy-0.1.0/aicortexpy/stream.py +422 -0
- aicortexpy-0.1.0/aicortexpy/terminal.py +147 -0
- aicortexpy-0.1.0/aicortexpy/tunnel.py +82 -0
- aicortexpy-0.1.0/aicortexpy/wakeup.py +222 -0
- aicortexpy-0.1.0/aicortexpy.egg-info/PKG-INFO +106 -0
- aicortexpy-0.1.0/aicortexpy.egg-info/SOURCES.txt +62 -0
- aicortexpy-0.1.0/aicortexpy.egg-info/dependency_links.txt +1 -0
- aicortexpy-0.1.0/aicortexpy.egg-info/requires.txt +6 -0
- aicortexpy-0.1.0/aicortexpy.egg-info/top_level.txt +1 -0
- aicortexpy-0.1.0/pyproject.toml +36 -0
- aicortexpy-0.1.0/setup.cfg +4 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: aicortexpy
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: AICortex Python local agent runtime daemon (no Docker)
|
|
5
|
+
Author: AICortex
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://gitee.com/seacozz2007/aicortex
|
|
8
|
+
Project-URL: Repository, https://gitee.com/seacozz2007/aicortex
|
|
9
|
+
Project-URL: Issues, https://gitee.com/seacozz2007/aicortex/issues
|
|
10
|
+
Requires-Python: >=3.10
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
Requires-Dist: websocket-client>=1.6
|
|
13
|
+
Provides-Extra: dev
|
|
14
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
15
|
+
Requires-Dist: build>=1.0; extra == "dev"
|
|
16
|
+
Requires-Dist: twine>=5.0; extra == "dev"
|
|
17
|
+
|
|
18
|
+
# aicortexpy(Python daemon)
|
|
19
|
+
|
|
20
|
+
用已批准的 `python.exe` 跑本地 agent runtime(跨 Windows / macOS / Linux),**无需 Docker**。
|
|
21
|
+
|
|
22
|
+
| | 名称 |
|
|
23
|
+
|--|--|
|
|
24
|
+
| PyPI | `aicortexpy`(`aicortex` 与已有包 `ai-cortex` 过近被拒) |
|
|
25
|
+
| 模块 | `aicortexpy`(不能叫 `aicortex`:本仓库目录也叫 `aicortex`,在父目录执行会撞 PEP 420 命名空间包) |
|
|
26
|
+
| 调用 | `python -m aicortexpy`(不注册 console script,避免与 Go CLI `aicortex` 抢 PATH) |
|
|
27
|
+
|
|
28
|
+
```powershell
|
|
29
|
+
pip install aicortexpy
|
|
30
|
+
python -m aicortexpy --help
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 安装
|
|
34
|
+
|
|
35
|
+
### 从 PyPI
|
|
36
|
+
|
|
37
|
+
```powershell
|
|
38
|
+
pip install -U aicortexpy
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 从源码(本仓库)
|
|
42
|
+
|
|
43
|
+
```powershell
|
|
44
|
+
cd python-daemon
|
|
45
|
+
pip install -e .
|
|
46
|
+
pip install -e ".[dev]" # 含 build / twine
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## 运行
|
|
50
|
+
|
|
51
|
+
```powershell
|
|
52
|
+
# 方式 A:经 Go aicortex CLI(推荐;需已 pip 安装本包)
|
|
53
|
+
$env:AICORTEX_DAEMON_BACKEND = "python"
|
|
54
|
+
aicortex daemon start
|
|
55
|
+
aicortex daemon status
|
|
56
|
+
aicortex daemon stop
|
|
57
|
+
|
|
58
|
+
# 方式 B:直接启动
|
|
59
|
+
python -m aicortexpy start --foreground
|
|
60
|
+
python -m aicortexpy capabilities
|
|
61
|
+
python -m aicortexpy --version
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
需要 `~/.aicortex/config.json`(token + server_url)以及 PATH 上的 agent CLI。
|
|
65
|
+
|
|
66
|
+
Health 默认端口 **19514**(与 Go / `aicortex daemon status` 一致)。**不要**与 Go daemon 同时跑在同一端口。
|
|
67
|
+
|
|
68
|
+
## 发布到 PyPI(对齐 aicorkit / aicortex-bridge)
|
|
69
|
+
|
|
70
|
+
在 `python-daemon/` 目录:
|
|
71
|
+
|
|
72
|
+
```powershell
|
|
73
|
+
python -m pip install -U build twine
|
|
74
|
+
python -m build
|
|
75
|
+
python -m twine upload dist/*
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
版本号改 `pyproject.toml` 的 `version` 与 `aicortexpy/__init__.py` 的 `__version__`(保持一致),再重新 build / upload。
|
|
79
|
+
|
|
80
|
+
## 已对齐能力(相对 Go daemon)
|
|
81
|
+
|
|
82
|
+
- 注册/心跳/wakeup/claim/cancel、agentEnv、prior_work_dir 复用
|
|
83
|
+
- Claude(stream-json + **MCP `--mcp-config`**)、Codex(+ semantic inactivity)
|
|
84
|
+
- Cursor/Gemini/OpenCode/Copilot **stream-json/json 事件流**
|
|
85
|
+
- Cursor/Kiro chat ACP 池;Kiro/Hermes/Kimi/Dsh ACP oneshot
|
|
86
|
+
- OpenClaw / pi 启动参数;OpenClaw config **fail-closed**
|
|
87
|
+
- Repo:**allowlist** + per-workspace bare + **worktree 锁** + co-authored hook
|
|
88
|
+
- Design:**handoff zip** + **example seed**
|
|
89
|
+
- Model list:**ACP discovery** + 60s cache
|
|
90
|
+
- GC:`.gc_meta.json` + **active-root 保护**
|
|
91
|
+
- Wakeup 侧带:**tunnel**、**artifact browse/chunk upload**、terminal(pipe MVP,需 `AICORTEX_DAEMON_TERMINAL_PTY=true`)
|
|
92
|
+
|
|
93
|
+
**仍偏薄 / partial**:真正的 ConPTY/unix PTY(现为 pipe shell)、OS sandbox wrapper(bwrap/Seatbelt)、Go 式 auto-update(用 `pip install -U aicortexpy`)。
|
|
94
|
+
|
|
95
|
+
## 环境变量(节选)
|
|
96
|
+
|
|
97
|
+
| 变量 | 含义 |
|
|
98
|
+
|------|------|
|
|
99
|
+
| `AICORTEX_DAEMON_BACKEND` | `python` 时 `aicortex daemon start` 启 Python daemon |
|
|
100
|
+
| `AICORTEX_DAEMON_HEALTH_PORT` | 默认 19514 |
|
|
101
|
+
| `AICORTEX_DAEMON_TERMINAL_PTY` | `true` 启用远程终端(pipe MVP) |
|
|
102
|
+
| `AICORTEX_AGENT_IDLE_WATCHDOG` | 无活动强停秒数(默认 300;`0` 关闭) |
|
|
103
|
+
| `AICORTEX_CODEX_SEMANTIC_INACTIVITY_TIMEOUT` | Codex 无输出强停(默认 600;`0` 关闭) |
|
|
104
|
+
| `AICORTEX_CODEX_MULTI_AGENT` | `1` 保留 Codex native multi_agent |
|
|
105
|
+
| `AICORTEX_INJECT_TENCENT_DOCS` | `1` 注入完整 tencent-docs 包 |
|
|
106
|
+
| `AICORTEX_GC_*` | GC 开关与 TTL |
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# aicortexpy(Python daemon)
|
|
2
|
+
|
|
3
|
+
用已批准的 `python.exe` 跑本地 agent runtime(跨 Windows / macOS / Linux),**无需 Docker**。
|
|
4
|
+
|
|
5
|
+
| | 名称 |
|
|
6
|
+
|--|--|
|
|
7
|
+
| PyPI | `aicortexpy`(`aicortex` 与已有包 `ai-cortex` 过近被拒) |
|
|
8
|
+
| 模块 | `aicortexpy`(不能叫 `aicortex`:本仓库目录也叫 `aicortex`,在父目录执行会撞 PEP 420 命名空间包) |
|
|
9
|
+
| 调用 | `python -m aicortexpy`(不注册 console script,避免与 Go CLI `aicortex` 抢 PATH) |
|
|
10
|
+
|
|
11
|
+
```powershell
|
|
12
|
+
pip install aicortexpy
|
|
13
|
+
python -m aicortexpy --help
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## 安装
|
|
17
|
+
|
|
18
|
+
### 从 PyPI
|
|
19
|
+
|
|
20
|
+
```powershell
|
|
21
|
+
pip install -U aicortexpy
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### 从源码(本仓库)
|
|
25
|
+
|
|
26
|
+
```powershell
|
|
27
|
+
cd python-daemon
|
|
28
|
+
pip install -e .
|
|
29
|
+
pip install -e ".[dev]" # 含 build / twine
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## 运行
|
|
33
|
+
|
|
34
|
+
```powershell
|
|
35
|
+
# 方式 A:经 Go aicortex CLI(推荐;需已 pip 安装本包)
|
|
36
|
+
$env:AICORTEX_DAEMON_BACKEND = "python"
|
|
37
|
+
aicortex daemon start
|
|
38
|
+
aicortex daemon status
|
|
39
|
+
aicortex daemon stop
|
|
40
|
+
|
|
41
|
+
# 方式 B:直接启动
|
|
42
|
+
python -m aicortexpy start --foreground
|
|
43
|
+
python -m aicortexpy capabilities
|
|
44
|
+
python -m aicortexpy --version
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
需要 `~/.aicortex/config.json`(token + server_url)以及 PATH 上的 agent CLI。
|
|
48
|
+
|
|
49
|
+
Health 默认端口 **19514**(与 Go / `aicortex daemon status` 一致)。**不要**与 Go daemon 同时跑在同一端口。
|
|
50
|
+
|
|
51
|
+
## 发布到 PyPI(对齐 aicorkit / aicortex-bridge)
|
|
52
|
+
|
|
53
|
+
在 `python-daemon/` 目录:
|
|
54
|
+
|
|
55
|
+
```powershell
|
|
56
|
+
python -m pip install -U build twine
|
|
57
|
+
python -m build
|
|
58
|
+
python -m twine upload dist/*
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
版本号改 `pyproject.toml` 的 `version` 与 `aicortexpy/__init__.py` 的 `__version__`(保持一致),再重新 build / upload。
|
|
62
|
+
|
|
63
|
+
## 已对齐能力(相对 Go daemon)
|
|
64
|
+
|
|
65
|
+
- 注册/心跳/wakeup/claim/cancel、agentEnv、prior_work_dir 复用
|
|
66
|
+
- Claude(stream-json + **MCP `--mcp-config`**)、Codex(+ semantic inactivity)
|
|
67
|
+
- Cursor/Gemini/OpenCode/Copilot **stream-json/json 事件流**
|
|
68
|
+
- Cursor/Kiro chat ACP 池;Kiro/Hermes/Kimi/Dsh ACP oneshot
|
|
69
|
+
- OpenClaw / pi 启动参数;OpenClaw config **fail-closed**
|
|
70
|
+
- Repo:**allowlist** + per-workspace bare + **worktree 锁** + co-authored hook
|
|
71
|
+
- Design:**handoff zip** + **example seed**
|
|
72
|
+
- Model list:**ACP discovery** + 60s cache
|
|
73
|
+
- GC:`.gc_meta.json` + **active-root 保护**
|
|
74
|
+
- Wakeup 侧带:**tunnel**、**artifact browse/chunk upload**、terminal(pipe MVP,需 `AICORTEX_DAEMON_TERMINAL_PTY=true`)
|
|
75
|
+
|
|
76
|
+
**仍偏薄 / partial**:真正的 ConPTY/unix PTY(现为 pipe shell)、OS sandbox wrapper(bwrap/Seatbelt)、Go 式 auto-update(用 `pip install -U aicortexpy`)。
|
|
77
|
+
|
|
78
|
+
## 环境变量(节选)
|
|
79
|
+
|
|
80
|
+
| 变量 | 含义 |
|
|
81
|
+
|------|------|
|
|
82
|
+
| `AICORTEX_DAEMON_BACKEND` | `python` 时 `aicortex daemon start` 启 Python daemon |
|
|
83
|
+
| `AICORTEX_DAEMON_HEALTH_PORT` | 默认 19514 |
|
|
84
|
+
| `AICORTEX_DAEMON_TERMINAL_PTY` | `true` 启用远程终端(pipe MVP) |
|
|
85
|
+
| `AICORTEX_AGENT_IDLE_WATCHDOG` | 无活动强停秒数(默认 300;`0` 关闭) |
|
|
86
|
+
| `AICORTEX_CODEX_SEMANTIC_INACTIVITY_TIMEOUT` | Codex 无输出强停(默认 600;`0` 关闭) |
|
|
87
|
+
| `AICORTEX_CODEX_MULTI_AGENT` | `1` 保留 Codex native multi_agent |
|
|
88
|
+
| `AICORTEX_INJECT_TENCENT_DOCS` | `1` 注入完整 tencent-docs 包 |
|
|
89
|
+
| `AICORTEX_GC_*` | GC 开关与 TTL |
|