cluxion-agentplugin-preprocessing 0.3.4__tar.gz → 0.3.7__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.
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/PKG-INFO +28 -1
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/README.md +27 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/pyproject.toml +1 -1
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_agentplugin_preprocessing/__init__.py +1 -1
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_agentplugin_preprocessing/cli.py +53 -6
- cluxion_agentplugin_preprocessing-0.3.7/src/cluxion_agentplugin_preprocessing/doctor/__init__.py +5 -0
- cluxion_agentplugin_preprocessing-0.3.7/src/cluxion_agentplugin_preprocessing/doctor/catalog.json +538 -0
- cluxion_agentplugin_preprocessing-0.3.7/src/cluxion_agentplugin_preprocessing/doctor/framework.py +177 -0
- cluxion_agentplugin_preprocessing-0.3.7/src/cluxion_agentplugin_preprocessing/doctor/probes.py +326 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_agentplugin_preprocessing/plugin.py +38 -1
- cluxion_agentplugin_preprocessing-0.3.7/tests/test_doctor.py +97 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/test_plugin.py +13 -1
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/.github/profile/README.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/.gitignore +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/Docs/README.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/LICENSE +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/adapters/claude/.claude-plugin/plugin.json +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/adapters/claude/skills/preprocess/SKILL.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/adapters/codex/config-snippet.toml +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/cluxion-Docs/README.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/cluxion-Docs/architecture.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/cluxion-Docs/harness-logic.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/cluxion-Docs/honesty-preprocessing.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/cluxion-Docs/install-and-operations.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/cluxion-Docs/security.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/rust/cluxion_queue/Cargo.lock +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/rust/cluxion_queue/Cargo.toml +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/rust/cluxion_queue/pyproject.toml +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/rust/cluxion_queue/src/context.rs +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/rust/cluxion_queue/src/dispatch.rs +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/rust/cluxion_queue/src/guard.rs +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/rust/cluxion_queue/src/lib.rs +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/rust/cluxion_queue/src/main.rs +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/rust/cluxion_queue/src/queue.rs +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/rust/cluxion_queue/src/types.rs +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_agentplugin_preprocessing/guard_watch.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_agentplugin_preprocessing/hermes_config.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_agentplugin_preprocessing/plugin.yaml +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_agentplugin_preprocessing/runner.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_agentplugin_preprocessing/schemas.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/__init__.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/__main__.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/adapters/__init__.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/adapters/contract.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/adapters/grok_build.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/adapters/hermes.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/adapters/spec.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/bootstrap.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/cli.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/core/__init__.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/core/clarification.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/core/context_compress.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/core/dispatch_store.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/core/harness.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/core/intent.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/core/ledger.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/core/ledger_codec.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/core/plan_codec.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/core/preprocess.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/core/types.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/core/work_queue.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/guard_daemon_host.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/models/__init__.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/models/supervisor.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/models/vllm_mlx.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/resources/__init__.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/resources/guard_bridge.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/resources/py_queue.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/resources/queue_bridge.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/resources/rust_bridge.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/web/__init__.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/src/cluxion_runtime/web/browser_bridge.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/runtime/test_browser_bridge.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/runtime/test_clarification.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/runtime/test_cluxion_runtime_spine.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/runtime/test_context_compress.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/runtime/test_contract.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/runtime/test_dispatch_store.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/runtime/test_guard.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/runtime/test_ledger.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/runtime/test_py_queue_concurrency.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/runtime/test_queue_backends.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/runtime/test_runtime_adapter_cli.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/runtime/test_rust_queue.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/runtime/test_supervisor.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/test_bootstrap.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/test_guard_watch.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/test_hermes_config.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/test_packaging_policy.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/tests/test_runner.py +0 -0
{cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cluxion-agentplugin-preprocessing
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.7
|
|
4
4
|
Summary: Universal agent plugin for Cluxion preprocessing, honesty contracts, clarification, Rust work queue, and resource-aware harness handoff.
|
|
5
5
|
Project-URL: Homepage, https://github.com/cluxion/cluxion-Agentplugin-preprocessing
|
|
6
6
|
Project-URL: Repository, https://github.com/cluxion/cluxion-Agentplugin-preprocessing
|
|
@@ -72,10 +72,23 @@ Hermes를 통해 제공되는 로컬 모델(vLLM/MLX)에서도 동일하게 동
|
|
|
72
72
|
- **내 Chrome으로 웹 검색** — 본인의 로그인된 브라우저 세션으로 Google / Naver / Perplexity / 사내
|
|
73
73
|
페이지를 검색합니다(위의 `[browser]` extra 필요).
|
|
74
74
|
|
|
75
|
+
## 점검
|
|
76
|
+
|
|
77
|
+
설치·Hermes 계약·작업큐·자원가드·네이티브 백엔드 상태를 결정론적으로 자가 진단합니다. 같은 상태면
|
|
78
|
+
항상 같은 결과를 출력하고, 문제가 있으면 증상과 해결 단계를 그대로 알려줍니다.
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
cluxion-preprocess doctor # 사람용 요약
|
|
82
|
+
cluxion-preprocess doctor --json # 구조화 출력
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Hermes 안에서는 `cluxion_doctor` 도구로도 노출됩니다.
|
|
86
|
+
|
|
75
87
|
## 문제 해결
|
|
76
88
|
|
|
77
89
|
| 증상 | 해결 |
|
|
78
90
|
|---|---|
|
|
91
|
+
| 무엇이든 이상함 | 먼저 `cluxion-preprocess doctor` 실행 — 원인과 해결 단계를 그대로 출력 |
|
|
79
92
|
| `playwright_not_installed` | `pip install 'cluxion-agentplugin-preprocessing[browser]' && playwright install chromium` |
|
|
80
93
|
| Hermes에 도구가 안 보임 | `cluxion-preprocess enable` 실행 후 Hermes 재시작 |
|
|
81
94
|
|
|
@@ -126,10 +139,24 @@ Once enabled, your agent gains these tools and calls them automatically:
|
|
|
126
139
|
- **Web search via your Chrome** — searches Google / Naver / Perplexity / internal pages
|
|
127
140
|
through your own logged-in browser session (needs the `[browser]` extra above).
|
|
128
141
|
|
|
142
|
+
## Diagnostics
|
|
143
|
+
|
|
144
|
+
A deterministic self-check of install, the Hermes contract, the work queue, the resource guard,
|
|
145
|
+
and the native backend. The same state always prints the same result, and on any problem it
|
|
146
|
+
shows the symptom and the exact fix steps.
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
cluxion-preprocess doctor # human summary
|
|
150
|
+
cluxion-preprocess doctor --json # structured output
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Also exposed inside Hermes as the `cluxion_doctor` tool.
|
|
154
|
+
|
|
129
155
|
## Troubleshooting
|
|
130
156
|
|
|
131
157
|
| Problem | Fix |
|
|
132
158
|
|---|---|
|
|
159
|
+
| Anything looks off | run `cluxion-preprocess doctor` first — it prints the cause and the exact fix steps |
|
|
133
160
|
| `playwright_not_installed` | `pip install 'cluxion-agentplugin-preprocessing[browser]' && playwright install chromium` |
|
|
134
161
|
| Tools don't appear in Hermes | run `cluxion-preprocess enable`, then restart Hermes |
|
|
135
162
|
|
{cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/README.md
RENAMED
|
@@ -40,10 +40,23 @@ Hermes를 통해 제공되는 로컬 모델(vLLM/MLX)에서도 동일하게 동
|
|
|
40
40
|
- **내 Chrome으로 웹 검색** — 본인의 로그인된 브라우저 세션으로 Google / Naver / Perplexity / 사내
|
|
41
41
|
페이지를 검색합니다(위의 `[browser]` extra 필요).
|
|
42
42
|
|
|
43
|
+
## 점검
|
|
44
|
+
|
|
45
|
+
설치·Hermes 계약·작업큐·자원가드·네이티브 백엔드 상태를 결정론적으로 자가 진단합니다. 같은 상태면
|
|
46
|
+
항상 같은 결과를 출력하고, 문제가 있으면 증상과 해결 단계를 그대로 알려줍니다.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cluxion-preprocess doctor # 사람용 요약
|
|
50
|
+
cluxion-preprocess doctor --json # 구조화 출력
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Hermes 안에서는 `cluxion_doctor` 도구로도 노출됩니다.
|
|
54
|
+
|
|
43
55
|
## 문제 해결
|
|
44
56
|
|
|
45
57
|
| 증상 | 해결 |
|
|
46
58
|
|---|---|
|
|
59
|
+
| 무엇이든 이상함 | 먼저 `cluxion-preprocess doctor` 실행 — 원인과 해결 단계를 그대로 출력 |
|
|
47
60
|
| `playwright_not_installed` | `pip install 'cluxion-agentplugin-preprocessing[browser]' && playwright install chromium` |
|
|
48
61
|
| Hermes에 도구가 안 보임 | `cluxion-preprocess enable` 실행 후 Hermes 재시작 |
|
|
49
62
|
|
|
@@ -94,10 +107,24 @@ Once enabled, your agent gains these tools and calls them automatically:
|
|
|
94
107
|
- **Web search via your Chrome** — searches Google / Naver / Perplexity / internal pages
|
|
95
108
|
through your own logged-in browser session (needs the `[browser]` extra above).
|
|
96
109
|
|
|
110
|
+
## Diagnostics
|
|
111
|
+
|
|
112
|
+
A deterministic self-check of install, the Hermes contract, the work queue, the resource guard,
|
|
113
|
+
and the native backend. The same state always prints the same result, and on any problem it
|
|
114
|
+
shows the symptom and the exact fix steps.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
cluxion-preprocess doctor # human summary
|
|
118
|
+
cluxion-preprocess doctor --json # structured output
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Also exposed inside Hermes as the `cluxion_doctor` tool.
|
|
122
|
+
|
|
97
123
|
## Troubleshooting
|
|
98
124
|
|
|
99
125
|
| Problem | Fix |
|
|
100
126
|
|---|---|
|
|
127
|
+
| Anything looks off | run `cluxion-preprocess doctor` first — it prints the cause and the exact fix steps |
|
|
101
128
|
| `playwright_not_installed` | `pip install 'cluxion-agentplugin-preprocessing[browser]' && playwright install chromium` |
|
|
102
129
|
| Tools don't appear in Hermes | run `cluxion-preprocess enable`, then restart Hermes |
|
|
103
130
|
|
{cluxion_agentplugin_preprocessing-0.3.4 → cluxion_agentplugin_preprocessing-0.3.7}/pyproject.toml
RENAMED
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cluxion-agentplugin-preprocessing"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.7"
|
|
8
8
|
description = "Universal agent plugin for Cluxion preprocessing, honesty contracts, clarification, Rust work queue, and resource-aware harness handoff."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -3,11 +3,18 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
import argparse
|
|
6
|
+
import importlib.resources
|
|
6
7
|
import json
|
|
7
8
|
import sys
|
|
9
|
+
from pathlib import Path
|
|
8
10
|
from typing import TYPE_CHECKING
|
|
9
11
|
|
|
10
12
|
from cluxion_agentplugin_preprocessing import __version__, hermes_config, runner
|
|
13
|
+
from cluxion_agentplugin_preprocessing.doctor import (
|
|
14
|
+
render_json,
|
|
15
|
+
render_text,
|
|
16
|
+
run_doctor,
|
|
17
|
+
)
|
|
11
18
|
from cluxion_runtime.bootstrap import ensure_local_runtime
|
|
12
19
|
|
|
13
20
|
if TYPE_CHECKING:
|
|
@@ -30,34 +37,52 @@ def main(argv: Sequence[str] | None = None) -> int:
|
|
|
30
37
|
return _disable(args)
|
|
31
38
|
if args.command == "hermes-config":
|
|
32
39
|
return _hermes_config(args)
|
|
40
|
+
if args.command == "doctor":
|
|
41
|
+
return _doctor(args)
|
|
33
42
|
parser.print_help(sys.stderr)
|
|
34
43
|
return 2
|
|
35
44
|
|
|
36
45
|
|
|
37
46
|
def _parser() -> argparse.ArgumentParser:
|
|
38
47
|
parser = argparse.ArgumentParser(prog="cluxion-preprocess")
|
|
39
|
-
parser.add_argument(
|
|
48
|
+
parser.add_argument(
|
|
49
|
+
"--version", action="version", version=f"cluxion-agentplugin-preprocessing {__version__}"
|
|
50
|
+
)
|
|
40
51
|
subparsers = parser.add_subparsers(dest="command")
|
|
41
52
|
subparsers.add_parser("check", help="Check whether cluxion-runtime is visible")
|
|
42
|
-
bootstrap = subparsers.add_parser(
|
|
53
|
+
bootstrap = subparsers.add_parser(
|
|
54
|
+
"bootstrap", help="Install or upgrade local runtime dependencies"
|
|
55
|
+
)
|
|
43
56
|
bootstrap.add_argument("--upgrade", action="store_true")
|
|
44
57
|
bootstrap.add_argument("--dry-run", action="store_true")
|
|
45
58
|
bootstrap.add_argument("--package", action="append", default=None)
|
|
46
|
-
status = subparsers.add_parser(
|
|
59
|
+
status = subparsers.add_parser(
|
|
60
|
+
"status", help="Show whether Hermes config enables this plugin"
|
|
61
|
+
)
|
|
47
62
|
status.add_argument("--home", default=None)
|
|
48
|
-
enable = subparsers.add_parser(
|
|
63
|
+
enable = subparsers.add_parser(
|
|
64
|
+
"enable", help="Enable the pip-installed plugin in Hermes config"
|
|
65
|
+
)
|
|
49
66
|
enable.add_argument("--home", default=None)
|
|
50
67
|
enable.add_argument("--dry-run", action="store_true")
|
|
51
|
-
disable = subparsers.add_parser(
|
|
68
|
+
disable = subparsers.add_parser(
|
|
69
|
+
"disable", help="Disable the pip-installed plugin in Hermes config"
|
|
70
|
+
)
|
|
52
71
|
disable.add_argument("--home", default=None)
|
|
53
72
|
disable.add_argument("--dry-run", action="store_true")
|
|
54
|
-
config = subparsers.add_parser(
|
|
73
|
+
config = subparsers.add_parser(
|
|
74
|
+
"hermes-config",
|
|
75
|
+
help="Render Hermes local endpoint config through cluxion-runtime",
|
|
76
|
+
)
|
|
55
77
|
config.add_argument("--model", required=True)
|
|
56
78
|
config.add_argument("--host", default="127.0.0.1")
|
|
57
79
|
config.add_argument("--port", type=int, default=23003)
|
|
58
80
|
config.add_argument("--context-length", type=int, default=131_072)
|
|
59
81
|
config.add_argument("--provider-key", default="cluxion-local")
|
|
60
82
|
config.add_argument("--display-name", default="Cluxion Local")
|
|
83
|
+
doctor = subparsers.add_parser("doctor", help="Run embedded health checks")
|
|
84
|
+
doctor.add_argument("--json", action="store_true")
|
|
85
|
+
doctor.add_argument("--verbose", action="store_true")
|
|
61
86
|
return parser
|
|
62
87
|
|
|
63
88
|
|
|
@@ -117,6 +142,28 @@ def _hermes_config(args: argparse.Namespace) -> int:
|
|
|
117
142
|
return 0 if result.ok else 1
|
|
118
143
|
|
|
119
144
|
|
|
145
|
+
def _doctor(args: argparse.Namespace) -> int:
|
|
146
|
+
pkg = "cluxion_agentplugin_preprocessing.doctor"
|
|
147
|
+
catalog_path = Path(str(importlib.resources.files(pkg).joinpath("catalog.json")))
|
|
148
|
+
result = run_doctor(
|
|
149
|
+
cwd=Path.cwd(),
|
|
150
|
+
hermes_bin="hermes",
|
|
151
|
+
catalog_path=catalog_path,
|
|
152
|
+
probes=__import__(
|
|
153
|
+
"cluxion_agentplugin_preprocessing.doctor.probes", fromlist=["PROBES"]
|
|
154
|
+
).PROBES,
|
|
155
|
+
plugin="preprocessing",
|
|
156
|
+
version=__version__,
|
|
157
|
+
)
|
|
158
|
+
text = render_text(result, __import__(
|
|
159
|
+
"cluxion_agentplugin_preprocessing.doctor.framework", fromlist=["load_catalog"]
|
|
160
|
+
).load_catalog(catalog_path), verbose=bool(args.verbose))
|
|
161
|
+
print(text, file=sys.stderr)
|
|
162
|
+
if args.json:
|
|
163
|
+
print(render_json(result))
|
|
164
|
+
return 0 if result.ok else 1
|
|
165
|
+
|
|
166
|
+
|
|
120
167
|
if __name__ == "__main__":
|
|
121
168
|
raise SystemExit(main())
|
|
122
169
|
|