cluxion-agentplugin-preprocessing 0.3.3__tar.gz → 0.3.4__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.
Files changed (85) hide show
  1. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/PKG-INFO +1 -1
  2. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/pyproject.toml +1 -1
  3. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_agentplugin_preprocessing/__init__.py +1 -1
  4. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/core/dispatch_store.py +21 -16
  5. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/resources/py_queue.py +1 -1
  6. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/runtime/test_dispatch_store.py +10 -0
  7. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/runtime/test_py_queue_concurrency.py +12 -0
  8. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/.github/profile/README.md +0 -0
  9. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/.gitignore +0 -0
  10. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/Docs/README.md +0 -0
  11. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/LICENSE +0 -0
  12. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/README.md +0 -0
  13. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/adapters/claude/.claude-plugin/plugin.json +0 -0
  14. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/adapters/claude/skills/preprocess/SKILL.md +0 -0
  15. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/adapters/codex/config-snippet.toml +0 -0
  16. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/cluxion-Docs/README.md +0 -0
  17. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/cluxion-Docs/architecture.md +0 -0
  18. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/cluxion-Docs/harness-logic.md +0 -0
  19. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/cluxion-Docs/honesty-preprocessing.md +0 -0
  20. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/cluxion-Docs/install-and-operations.md +0 -0
  21. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/cluxion-Docs/security.md +0 -0
  22. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/rust/cluxion_queue/Cargo.lock +0 -0
  23. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/rust/cluxion_queue/Cargo.toml +0 -0
  24. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/rust/cluxion_queue/pyproject.toml +0 -0
  25. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/rust/cluxion_queue/src/context.rs +0 -0
  26. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/rust/cluxion_queue/src/dispatch.rs +0 -0
  27. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/rust/cluxion_queue/src/guard.rs +0 -0
  28. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/rust/cluxion_queue/src/lib.rs +0 -0
  29. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/rust/cluxion_queue/src/main.rs +0 -0
  30. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/rust/cluxion_queue/src/queue.rs +0 -0
  31. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/rust/cluxion_queue/src/types.rs +0 -0
  32. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_agentplugin_preprocessing/cli.py +0 -0
  33. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_agentplugin_preprocessing/guard_watch.py +0 -0
  34. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_agentplugin_preprocessing/hermes_config.py +0 -0
  35. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_agentplugin_preprocessing/plugin.py +0 -0
  36. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_agentplugin_preprocessing/plugin.yaml +0 -0
  37. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_agentplugin_preprocessing/runner.py +0 -0
  38. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_agentplugin_preprocessing/schemas.py +0 -0
  39. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/__init__.py +0 -0
  40. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/__main__.py +0 -0
  41. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/adapters/__init__.py +0 -0
  42. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/adapters/contract.py +0 -0
  43. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/adapters/grok_build.py +0 -0
  44. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/adapters/hermes.py +0 -0
  45. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/adapters/spec.py +0 -0
  46. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/bootstrap.py +0 -0
  47. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/cli.py +0 -0
  48. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/core/__init__.py +0 -0
  49. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/core/clarification.py +0 -0
  50. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/core/context_compress.py +0 -0
  51. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/core/harness.py +0 -0
  52. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/core/intent.py +0 -0
  53. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/core/ledger.py +0 -0
  54. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/core/ledger_codec.py +0 -0
  55. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/core/plan_codec.py +0 -0
  56. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/core/preprocess.py +0 -0
  57. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/core/types.py +0 -0
  58. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/core/work_queue.py +0 -0
  59. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/guard_daemon_host.py +0 -0
  60. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/models/__init__.py +0 -0
  61. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/models/supervisor.py +0 -0
  62. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/models/vllm_mlx.py +0 -0
  63. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/resources/__init__.py +0 -0
  64. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/resources/guard_bridge.py +0 -0
  65. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/resources/queue_bridge.py +0 -0
  66. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/resources/rust_bridge.py +0 -0
  67. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/web/__init__.py +0 -0
  68. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/src/cluxion_runtime/web/browser_bridge.py +0 -0
  69. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/runtime/test_browser_bridge.py +0 -0
  70. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/runtime/test_clarification.py +0 -0
  71. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/runtime/test_cluxion_runtime_spine.py +0 -0
  72. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/runtime/test_context_compress.py +0 -0
  73. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/runtime/test_contract.py +0 -0
  74. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/runtime/test_guard.py +0 -0
  75. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/runtime/test_ledger.py +0 -0
  76. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/runtime/test_queue_backends.py +0 -0
  77. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/runtime/test_runtime_adapter_cli.py +0 -0
  78. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/runtime/test_rust_queue.py +0 -0
  79. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/runtime/test_supervisor.py +0 -0
  80. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/test_bootstrap.py +0 -0
  81. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/test_guard_watch.py +0 -0
  82. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/test_hermes_config.py +0 -0
  83. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/test_packaging_policy.py +0 -0
  84. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/test_plugin.py +0 -0
  85. {cluxion_agentplugin_preprocessing-0.3.3 → cluxion_agentplugin_preprocessing-0.3.4}/tests/test_runner.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cluxion-agentplugin-preprocessing
3
- Version: 0.3.3
3
+ Version: 0.3.4
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
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "cluxion-agentplugin-preprocessing"
7
- version = "0.3.3"
7
+ version = "0.3.4"
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"
@@ -2,6 +2,6 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- __version__ = "0.3.3"
5
+ __version__ = "0.3.4"
6
6
 
7
7
  __all__ = ["__version__"]
@@ -146,15 +146,19 @@ def build_briefing_payload(work_id: str, *, dispatch_dir: Path | None = None) ->
146
146
  """Bundle all segment results into a final synthesis prompt."""
147
147
  bundle = load_dispatch_bundle(work_id, dispatch_dir=dispatch_dir)
148
148
  steps = _steps(bundle)
149
- missing = [str(step.get("step_id", "")) for step in steps if step.get("status") != "succeeded"]
149
+ missing: list[str] = []
150
+ briefing_blocks: list[str] = []
151
+ for step in steps:
152
+ if step.get("status") != "succeeded":
153
+ missing.append(str(step.get("step_id", "")))
154
+ briefing_blocks.append(_briefing_step_block(step))
150
155
  if missing:
151
156
  return {"work_id": work_id, "ready": False, "missing_steps": missing, "briefing_prompt": ""}
152
- prompt = _briefing_prompt(bundle, steps)
153
157
  return {
154
158
  "work_id": work_id,
155
159
  "ready": True,
156
160
  "missing_steps": [],
157
- "briefing_prompt": prompt,
161
+ "briefing_prompt": _briefing_prompt(bundle, briefing_blocks),
158
162
  "result_count": len(steps),
159
163
  }
160
164
 
@@ -204,7 +208,7 @@ def _public_step(step: dict[str, object]) -> dict[str, object]:
204
208
  }
205
209
 
206
210
 
207
- def _briefing_prompt(bundle: dict[str, object], steps: list[dict[str, object]]) -> str:
211
+ def _briefing_prompt(bundle: dict[str, object], briefing_blocks: list[str]) -> str:
208
212
  lines = [
209
213
  "[cluxion_final_briefing]",
210
214
  f"work_id={bundle.get('work_id', '')}",
@@ -212,20 +216,21 @@ def _briefing_prompt(bundle: dict[str, object], steps: list[dict[str, object]])
212
216
  "Separate verified facts, tool results, inferences, missing checks, and remaining risks.",
213
217
  "[segment_results]",
214
218
  ]
215
- for step in steps:
216
- lines.append(
217
- "\n".join(
218
- [
219
- f"step_id={step.get('step_id', '')}",
220
- f"segment_id={step.get('segment_id', '')}",
221
- f"checksum={step.get('checksum', '')}",
222
- str(step.get("result", "")),
223
- ]
224
- )
225
- )
219
+ lines.extend(briefing_blocks)
226
220
  return "\n\n".join(lines)
227
221
 
228
222
 
223
+ def _briefing_step_block(step: dict[str, object]) -> str:
224
+ return "\n".join(
225
+ [
226
+ f"step_id={step.get('step_id', '')}",
227
+ f"segment_id={step.get('segment_id', '')}",
228
+ f"checksum={step.get('checksum', '')}",
229
+ str(step.get("result", "")),
230
+ ]
231
+ )
232
+
233
+
229
234
  def _steps(bundle: dict[str, object]) -> list[dict[str, object]]:
230
235
  steps = bundle.get("steps")
231
236
  if not isinstance(steps, list):
@@ -269,7 +274,7 @@ def _exclusive_bundle_lock(path: Path) -> Iterator[None]:
269
274
  # Non-POSIX platforms keep atomic rename but skip advisory locking.
270
275
  yield
271
276
  return
272
- lock_path = path.with_name(f"{path.name}.lock")
277
+ lock_path = path.parent / ".dispatch.lock"
273
278
  with lock_path.open("a+b") as lock_file:
274
279
  _fcntl.flock(lock_file.fileno(), _fcntl.LOCK_EX)
275
280
  try:
@@ -290,7 +290,7 @@ def _exclusive_bundle_lock(path: Path) -> Iterator[None]:
290
290
  # Non-POSIX platforms keep atomic rename but skip advisory locking.
291
291
  yield
292
292
  return
293
- lock_path = path.with_name(f"{path.name}.lock")
293
+ lock_path = path.parent / ".dispatch.lock"
294
294
  with lock_path.open("a+b") as lock_file:
295
295
  _fcntl.flock(lock_file.fileno(), _fcntl.LOCK_EX)
296
296
  try:
@@ -108,6 +108,16 @@ def test_next_marks_step_running_on_disk(tmp_path: Path, queued_plan: HarnessPla
108
108
  assert statuses.count("running") == 1
109
109
 
110
110
 
111
+ def test_dispatch_store_uses_shared_lock_instead_of_per_bundle_locks(tmp_path: Path, queued_plan: HarnessPlan) -> None:
112
+ persist_dispatch_bundle(queued_plan, dispatch_dir=tmp_path)
113
+ payload = next_dispatch_step("w-queued", dispatch_dir=tmp_path)
114
+ record_dispatch_result("w-queued", str(payload["step"]["step_id"]), result="done", dispatch_dir=tmp_path)
115
+
116
+ assert not (tmp_path / "w-queued.json.lock").exists()
117
+ if dispatch_store._fcntl is not None:
118
+ assert (tmp_path / ".dispatch.lock").exists()
119
+
120
+
111
121
  def test_concurrent_next_dispatch_steps_do_not_claim_same_step(
112
122
  tmp_path: Path, queued_plan: HarnessPlan, monkeypatch: pytest.MonkeyPatch
113
123
  ) -> None:
@@ -117,6 +117,18 @@ def test_python_queue_concurrent_record_steps_preserve_both_updates(
117
117
  assert steps[step_ids[1]]["result"] == "done:1"
118
118
 
119
119
 
120
+ def test_python_queue_uses_shared_lock_instead_of_per_bundle_locks(tmp_path: Path) -> None:
121
+ store_dir = tmp_path / "queue"
122
+ py_queue.run("persist", _store_payload(store_dir, work_id="py-race", bundle=_bundle(1)))
123
+ payload = py_queue.run("next", _store_payload(store_dir, work_id="py-race"))
124
+ py_queue.run("record", _store_payload(store_dir, work_id="py-race", step_id=payload["step"]["step_id"]))
125
+
126
+ dispatch_dir = store_dir / "dispatch"
127
+ assert not (dispatch_dir / "py-race.json.lock").exists()
128
+ if py_queue._fcntl is not None:
129
+ assert (dispatch_dir / ".dispatch.lock").exists()
130
+
131
+
120
132
  def test_python_queue_concurrent_dequeue_serializes_select_update(
121
133
  tmp_path: Path, monkeypatch: pytest.MonkeyPatch
122
134
  ) -> None: