Files
skills/skills/kvb-org-organize/scripts/news.py
T
Kevin Veen-BirkenbachandClaude Opus 5.5 27559dabc4 feat(org): kvb-org-radio and kvb-org-queue replace chair and peer messages
kvb-org-radio is the default channel to other agents: broadcast and direct reach the receiver on its next prompt, security and pan-pan mid-turn through a PostToolBatch hook, and only mayday or direct --wake wake a session, through the receiver's own asyncRewake Stop hook (a SendMessage fallback is printed for sessions without a listener). It keeps the news.jsonl store and lock, so news.py stays a forwarding shim. A mayday holds radio silence for two hours: watch.py blocks new heavy commands and the operator gets a desktop notice. hotfix.py announces merged hotfixes as security items.

kvb-org-queue grants heavy jobs by rule instead of chair messages: queue.py hold waits under a flock with disk reservation, hotfix-first and register rank order, slot limits, stage and silence checks, then runs the command and releases. Every job is recorded; history.py learns disk need per command and slot limits per kind (p90, five runs), watch.py mirrors the history to ~/.local/state. enable-plugins.js registers the new hooks behind a file check so a missing script never blocks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 17:07:24 +01:00

33 lines
961 B
Python
Executable File

#!/usr/bin/env python3
"""Forward the old news.py calls to radio.py of the kvb-org-radio skill, which owns the same store.
Args:
post "<text>" [--to <name> ...] [--session <id>], hook, show [--all]
[--session <id>]: passed to radio.py unchanged; see its docstring.
Exit codes:
radio.py's; when radio.py is missing, 0 for hook and 2 for the rest.
"""
from __future__ import annotations
import os
import sys
from pathlib import Path
RADIO = Path(__file__).resolve().parents[2] / "kvb-org-radio" / "scripts" / "radio.py"
def main() -> int:
if not RADIO.is_file():
# A UserPromptSubmit hook exiting 2 blocks every prompt of the session.
if sys.argv[1:2] == ["hook"]:
return 0
print(f"news: {RADIO} is missing; install the kvb-org-radio skill", file=sys.stderr)
return 2
os.execv(sys.executable, [sys.executable, str(RADIO), *sys.argv[1:]])
if __name__ == "__main__":
sys.exit(main())