squawkbox 0.1.0__py3-none-any.whl

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.
squawkbox/__init__.py ADDED
@@ -0,0 +1,5 @@
1
+ """Thin Python wrapper for the squawkbox Node CLI."""
2
+
3
+ __all__ = ["__version__"]
4
+
5
+ __version__ = "0.1.0"
squawkbox/__main__.py ADDED
@@ -0,0 +1,4 @@
1
+ from .cli import main
2
+
3
+
4
+ raise SystemExit(main())
squawkbox/cli.py ADDED
@@ -0,0 +1,59 @@
1
+ from __future__ import annotations
2
+
3
+ import shutil
4
+ import subprocess
5
+ import sys
6
+ from pathlib import Path
7
+ from typing import Iterable, Sequence
8
+
9
+
10
+ PACKAGE_NAME = "squawkbox"
11
+
12
+
13
+ def _candidate_roots(start: Path) -> Iterable[Path]:
14
+ current = start.resolve()
15
+ if current.is_file():
16
+ current = current.parent
17
+ yield current
18
+ yield from current.parents
19
+
20
+
21
+ def find_local_cli(search_root: Path | None = None) -> Path | None:
22
+ start = search_root or Path(__file__)
23
+ for root in _candidate_roots(start):
24
+ cli_path = root / "dist" / "cli.js"
25
+ if (root / "package.json").is_file() and cli_path.is_file():
26
+ return cli_path
27
+ return None
28
+
29
+
30
+ def resolve_command(search_root: Path | None = None) -> list[str]:
31
+ cli_path = find_local_cli(search_root)
32
+ if cli_path is not None:
33
+ node = shutil.which("node")
34
+ if node is None:
35
+ raise RuntimeError("node is required to run the local squawkbox CLI")
36
+ return [node, str(cli_path)]
37
+ return ["npx", "-y", PACKAGE_NAME]
38
+
39
+
40
+ def run(argv: Sequence[str] | None = None) -> int:
41
+ args = list(sys.argv[1:] if argv is None else argv)
42
+ command = resolve_command()
43
+ try:
44
+ completed = subprocess.run([*command, *args], check=False)
45
+ except FileNotFoundError as exc:
46
+ executable = exc.filename or command[0]
47
+ sys.stderr.write(
48
+ f"squawkbox: required executable not found: {executable}\n",
49
+ )
50
+ return 1
51
+ return int(completed.returncode)
52
+
53
+
54
+ def main() -> int:
55
+ try:
56
+ return run()
57
+ except RuntimeError as exc:
58
+ sys.stderr.write(f"squawkbox: {exc}\n")
59
+ return 1
@@ -0,0 +1,45 @@
1
+ Metadata-Version: 2.4
2
+ Name: squawkbox
3
+ Version: 0.1.0
4
+ Summary: Thin PyPI wrapper for the squawkbox Node CLI — the intercom for your AI agents.
5
+ Author: Ben Wiseman
6
+ License: MIT
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Environment :: Console
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Topic :: Software Development :: Build Tools
15
+ Requires-Python: >=3.9
16
+ Description-Content-Type: text/markdown
17
+
18
+ # squawkbox (PyPI wrapper)
19
+
20
+ **The intercom for your AI agents** — `pip`/`uvx` access to
21
+ [squawkbox](https://github.com/BenWiseman/squawkbox), a local MCP message broker
22
+ that lets parallel AI coding agents (Claude Code, Codex, and concurrent
23
+ sessions) coordinate instead of colliding.
24
+
25
+ This package is a thin wrapper around the Node CLI: it runs a local build if one
26
+ is present, otherwise falls back to `npx -y squawkbox`. The implementation,
27
+ docs, and demo live in the main repo.
28
+
29
+ ## Install
30
+
31
+ ```bash
32
+ pip install squawkbox # or: uvx squawkbox
33
+ ```
34
+
35
+ ## Use
36
+
37
+ ```bash
38
+ squawkbox shim --runtime claude # wire into your MCP client (see the repo)
39
+ squawkbox daemon # run the broker standalone
40
+ ```
41
+
42
+ Full docs, the 60-second quickstart, and MCP config snippets:
43
+ **https://github.com/BenWiseman/squawkbox**
44
+
45
+ MIT.
@@ -0,0 +1,8 @@
1
+ squawkbox/__init__.py,sha256=4wkiYin8rCrOvWNbuQrzd8FJzGEPNbasF154buz_QyA,104
2
+ squawkbox/__main__.py,sha256=D31U8_ux95qF64EQ8ReT25nabzxh7ped5avpobXz_bM,49
3
+ squawkbox/cli.py,sha256=GU_tgCoJsJg-Ye6XhUekWsWW3-dsktIo4APF8n4m-6Y,1647
4
+ squawkbox-0.1.0.dist-info/METADATA,sha256=aG4B2-KFCgM9sjG9AXIQca07A0d89MmSB4rFP52k0yc,1455
5
+ squawkbox-0.1.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
6
+ squawkbox-0.1.0.dist-info/entry_points.txt,sha256=K2__mGouxzDaeGUVb8GcX7DWW46AIWVIcytRPJAT8p8,49
7
+ squawkbox-0.1.0.dist-info/top_level.txt,sha256=bJ9v_-OjczHuJ7o_DcXD6CX7IlMP5op5op5NhJwF55s,10
8
+ squawkbox-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ squawkbox = squawkbox.cli:main
@@ -0,0 +1 @@
1
+ squawkbox