cluxion-agentplugin-preprocessing 0.3.22__tar.gz → 0.3.23__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.22 → cluxion_agentplugin_preprocessing-0.3.23}/PKG-INFO +1 -1
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/pyproject.toml +1 -1
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_agentplugin_preprocessing/plugin.py +2 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_agentplugin_preprocessing/plugin.yaml +1 -1
- cluxion_agentplugin_preprocessing-0.3.23/src/cluxion_agentplugin_preprocessing/slash_commands.py +121 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/test_plugin.py +17 -0
- cluxion_agentplugin_preprocessing-0.3.23/tests/test_slash_commands.py +8 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/.github/profile/README.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/.gitignore +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/Docs/README.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/LICENSE +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/README.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/adapters/claude/.claude-plugin/plugin.json +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/adapters/claude/skills/preprocess/SKILL.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/adapters/codex/config-snippet.toml +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/cluxion-Docs/README.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/cluxion-Docs/architecture.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/cluxion-Docs/harness-logic.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/cluxion-Docs/honesty-preprocessing.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/cluxion-Docs/install-and-operations.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/cluxion-Docs/security.md +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/rust/cluxion_queue/Cargo.lock +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/rust/cluxion_queue/Cargo.toml +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/rust/cluxion_queue/pyproject.toml +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/rust/cluxion_queue/src/context.rs +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/rust/cluxion_queue/src/dispatch.rs +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/rust/cluxion_queue/src/guard.rs +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/rust/cluxion_queue/src/lib.rs +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/rust/cluxion_queue/src/main.rs +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/rust/cluxion_queue/src/queue.rs +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/rust/cluxion_queue/src/types.rs +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/rust/cluxion_queue/uv.lock +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_agentplugin_preprocessing/__init__.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_agentplugin_preprocessing/cli.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_agentplugin_preprocessing/doctor/__init__.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_agentplugin_preprocessing/doctor/catalog.json +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_agentplugin_preprocessing/doctor/framework.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_agentplugin_preprocessing/doctor/probes.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_agentplugin_preprocessing/guard_watch.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_agentplugin_preprocessing/hermes_config.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_agentplugin_preprocessing/runner.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_agentplugin_preprocessing/schemas.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/__init__.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/__main__.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/adapters/__init__.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/adapters/contract.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/adapters/grok_build.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/adapters/hermes.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/adapters/spec.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/bootstrap.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/cli.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/core/__init__.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/core/clarification.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/core/context_compress.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/core/dispatch_store.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/core/harness.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/core/hybrid_forget.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/core/intent.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/core/ledger.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/core/ledger_codec.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/core/llm_compress.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/core/loop_auto.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/core/plan_codec.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/core/preprocess.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/core/types.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/core/work_queue.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/guard_daemon_host.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/models/__init__.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/models/supervisor.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/models/vllm_mlx.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/resources/__init__.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/resources/guard_bridge.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/resources/py_queue.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/resources/queue_bridge.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/resources/rust_bridge.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/web/__init__.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/src/cluxion_runtime/web/browser_bridge.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_auto_compress_middleware.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_bin_resolution.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_browser_bridge.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_clarification.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_cluxion_runtime_spine.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_context_compress.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_context_compress_llm_forget.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_contract.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_dispatch_store.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_estimate_tokens.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_guard.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_guard_daemon_host.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_ledger.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_loop_auto.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_py_queue_concurrency.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_queue_backends.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_runtime_adapter_cli.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_rust_queue.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/runtime/test_supervisor.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/test_bootstrap.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/test_doctor.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/test_guard_watch.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/test_hermes_config.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/test_packaging_policy.py +0 -0
- {cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/tests/test_runner.py +0 -0
{cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/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.23
|
|
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
|
{cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/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.23"
|
|
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"
|
|
@@ -28,6 +28,7 @@ from cluxion_agentplugin_preprocessing.schemas import (
|
|
|
28
28
|
SERVE_LOCAL_SCHEMA,
|
|
29
29
|
WEB_SEARCH_SCHEMA,
|
|
30
30
|
)
|
|
31
|
+
from cluxion_agentplugin_preprocessing.slash_commands import register_slash_commands
|
|
31
32
|
from cluxion_runtime.core.context_compress import (
|
|
32
33
|
DEFAULT_TRIGGER_RATIO,
|
|
33
34
|
_resolve_context_limit,
|
|
@@ -42,6 +43,7 @@ if TYPE_CHECKING:
|
|
|
42
43
|
|
|
43
44
|
def register(ctx: object) -> None:
|
|
44
45
|
"""Register Cluxion preprocessing tools with the host agent."""
|
|
46
|
+
register_slash_commands(ctx)
|
|
45
47
|
register_hook = getattr(ctx, "register_hook", None)
|
|
46
48
|
if callable(register_hook):
|
|
47
49
|
register_hook("on_session_start", guard_watch.on_session_start)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name: cluxion-agentplugin-preprocessing
|
|
2
|
-
version: 0.3.
|
|
2
|
+
version: 0.3.23
|
|
3
3
|
description: "Universal agent preprocessing plugin: honesty contracts, clarification, Rust work queue, resource-aware harness handoff. Connected AI calls cluxion tools; plugin does not own models."
|
|
4
4
|
author: cluxion
|
|
5
5
|
kind: standalone
|
cluxion_agentplugin_preprocessing-0.3.23/src/cluxion_agentplugin_preprocessing/slash_commands.py
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"""In-session slash commands for Hermes (/loopauto, /cluxion-doctor)."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
from cluxion_agentplugin_preprocessing import runner
|
|
9
|
+
from cluxion_agentplugin_preprocessing.doctor import render_text, run_doctor
|
|
10
|
+
from cluxion_agentplugin_preprocessing.doctor.probes import PROBES
|
|
11
|
+
|
|
12
|
+
LOOPAUTO_HELP = """\
|
|
13
|
+
/loopauto <prompt> — Autonomous queue drain (loopAuto)
|
|
14
|
+
|
|
15
|
+
Plans the task, stores segment content in the Rust queue, then loops:
|
|
16
|
+
queue_next → hermes -z → queue_record → … → briefing
|
|
17
|
+
|
|
18
|
+
Examples:
|
|
19
|
+
/loopauto implement every REQ line and record evidence
|
|
20
|
+
/loopauto refactor auth module with tests
|
|
21
|
+
|
|
22
|
+
Notes:
|
|
23
|
+
- Equivalent to prefixing a prompt with /loopAuto on cluxion_plan
|
|
24
|
+
- Disable auto-loop: export CLUXION_LOOP_AUTO=0
|
|
25
|
+
- Diagnostics only: add loop_auto_dry_run via cluxion_plan tool
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
CLUXION_DOCTOR_HELP = "/cluxion-doctor — Run preprocessing plugin health checks (doctor)."
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def register_slash_commands(ctx: object) -> None:
|
|
32
|
+
register = getattr(ctx, "register_command", None)
|
|
33
|
+
if not callable(register):
|
|
34
|
+
return
|
|
35
|
+
register(
|
|
36
|
+
"loopauto",
|
|
37
|
+
handle_loopauto,
|
|
38
|
+
description="Autonomous queue drain (loopAuto) — plan + Hermes oneshot segment loop",
|
|
39
|
+
args_hint="<prompt>",
|
|
40
|
+
)
|
|
41
|
+
register(
|
|
42
|
+
"cluxion-doctor",
|
|
43
|
+
handle_cluxion_doctor,
|
|
44
|
+
description="Run cluxion preprocessing plugin doctor checks",
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def handle_loopauto(raw_args: str) -> str:
|
|
49
|
+
prompt = raw_args.strip()
|
|
50
|
+
if not prompt or prompt.lower() in {"help", "-h", "--help"}:
|
|
51
|
+
return LOOPAUTO_HELP
|
|
52
|
+
try:
|
|
53
|
+
result = runner.plan(
|
|
54
|
+
{
|
|
55
|
+
"prompt": f"/loopAuto {prompt}",
|
|
56
|
+
"cwd": str(Path.cwd()),
|
|
57
|
+
"clarification_answers": "confirmed via /loopauto slash command",
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
return _format_plan_response(result.to_json())
|
|
61
|
+
except Exception as exc:
|
|
62
|
+
return f"loopauto error: {exc}"
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def handle_cluxion_doctor(raw_args: str) -> str:
|
|
66
|
+
if raw_args.strip().lower() in {"help", "-h", "--help"}:
|
|
67
|
+
return CLUXION_DOCTOR_HELP
|
|
68
|
+
import importlib.resources
|
|
69
|
+
|
|
70
|
+
from cluxion_agentplugin_preprocessing import __version__
|
|
71
|
+
from cluxion_agentplugin_preprocessing.doctor.framework import load_catalog
|
|
72
|
+
|
|
73
|
+
pkg = "cluxion_agentplugin_preprocessing.doctor"
|
|
74
|
+
catalog_path = Path(str(importlib.resources.files(pkg).joinpath("catalog.json")))
|
|
75
|
+
result = run_doctor(
|
|
76
|
+
cwd=Path.cwd(),
|
|
77
|
+
hermes_bin="hermes",
|
|
78
|
+
catalog_path=catalog_path,
|
|
79
|
+
probes=PROBES,
|
|
80
|
+
plugin="preprocessing",
|
|
81
|
+
version=__version__,
|
|
82
|
+
)
|
|
83
|
+
return render_text(result, load_catalog(catalog_path))
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def _format_plan_response(raw_json: str) -> str:
|
|
87
|
+
payload = json.loads(raw_json)
|
|
88
|
+
if not payload.get("ok"):
|
|
89
|
+
return f"loopauto failed: {payload.get('error', 'unknown error')}"
|
|
90
|
+
body = payload.get("result", payload)
|
|
91
|
+
if not isinstance(body, dict):
|
|
92
|
+
return str(body)
|
|
93
|
+
loop = body.get("loop_auto")
|
|
94
|
+
if isinstance(loop, dict):
|
|
95
|
+
lines = [
|
|
96
|
+
f"[loopauto] ok={loop.get('ok')} status={loop.get('status')}",
|
|
97
|
+
f"segments_processed={loop.get('segments_processed')} "
|
|
98
|
+
f"segments_failed={loop.get('segments_failed')} "
|
|
99
|
+
f"duration_ms={loop.get('duration_ms')}",
|
|
100
|
+
]
|
|
101
|
+
if loop.get("error"):
|
|
102
|
+
lines.append(f"error: {loop['error']}")
|
|
103
|
+
briefing = str(loop.get("briefing_answer", "")).strip()
|
|
104
|
+
if briefing:
|
|
105
|
+
lines.extend(["", briefing])
|
|
106
|
+
return "\n".join(lines)
|
|
107
|
+
host = body.get("host_execution")
|
|
108
|
+
if isinstance(host, dict) and host.get("queue_required"):
|
|
109
|
+
return (
|
|
110
|
+
"Plan queued but loop_auto did not run. "
|
|
111
|
+
"Check CLUXION_LOOP_AUTO=1 and hermes on PATH (cluxion-preprocess doctor)."
|
|
112
|
+
)
|
|
113
|
+
return json.dumps(body, ensure_ascii=False, indent=2)[:8000]
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
__all__ = [
|
|
117
|
+
"LOOPAUTO_HELP",
|
|
118
|
+
"handle_cluxion_doctor",
|
|
119
|
+
"handle_loopauto",
|
|
120
|
+
"register_slash_commands",
|
|
121
|
+
]
|
|
@@ -11,6 +11,20 @@ from cluxion_agentplugin_preprocessing import plugin
|
|
|
11
11
|
class FakeContext:
|
|
12
12
|
def __init__(self) -> None:
|
|
13
13
|
self.tools: dict[str, dict[str, object]] = {}
|
|
14
|
+
self.commands: dict[str, dict[str, object]] = {}
|
|
15
|
+
|
|
16
|
+
def register_command(
|
|
17
|
+
self,
|
|
18
|
+
name: str,
|
|
19
|
+
handler: object,
|
|
20
|
+
description: str = "",
|
|
21
|
+
args_hint: str = "",
|
|
22
|
+
) -> None:
|
|
23
|
+
self.commands[name] = {
|
|
24
|
+
"handler": handler,
|
|
25
|
+
"description": description,
|
|
26
|
+
"args_hint": args_hint,
|
|
27
|
+
}
|
|
14
28
|
|
|
15
29
|
def register_tool(
|
|
16
30
|
self,
|
|
@@ -56,6 +70,9 @@ def test_register_adds_expected_tools() -> None:
|
|
|
56
70
|
"cluxion_web_search",
|
|
57
71
|
]
|
|
58
72
|
assert {tool["toolset"] for tool in ctx.tools.values()} == {"cluxion"}
|
|
73
|
+
assert "loopauto" in ctx.commands
|
|
74
|
+
assert "cluxion-doctor" in ctx.commands
|
|
75
|
+
assert ctx.commands["loopauto"]["args_hint"] == "<prompt>"
|
|
59
76
|
|
|
60
77
|
|
|
61
78
|
def test_handler_returns_json_error_for_missing_model() -> None:
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from cluxion_agentplugin_preprocessing.slash_commands import LOOPAUTO_HELP, handle_loopauto
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_loopauto_help_without_args() -> None:
|
|
7
|
+
assert "Autonomous queue drain" in handle_loopauto("")
|
|
8
|
+
assert handle_loopauto("help") == LOOPAUTO_HELP
|
|
File without changes
|
{cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/.gitignore
RENAMED
|
File without changes
|
{cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/Docs/README.md
RENAMED
|
File without changes
|
{cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/LICENSE
RENAMED
|
File without changes
|
{cluxion_agentplugin_preprocessing-0.3.22 → cluxion_agentplugin_preprocessing-0.3.23}/README.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|