mainplane 0.5.8__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.
mainplane/SHA256SUMS ADDED
@@ -0,0 +1,16 @@
1
+ f0d873b7d15b3619220ebee9cdda5d2aa949d808785a0126266b3f9d454bcdc3 CHANGELOG.md
2
+ 416f0fd1e7c0cc10a0dda91af08a552427e7eb8c049fea557eddb0256191ef2a THIRD_PARTY_NOTICES
3
+ 642fdd7c998069dca1b0a9d64d59f012ff68b7bb290f00482d1b7aef13ec76ac install.ps1
4
+ 528738d39a2a00c53d07f0f121b346d70cade361f8947a1789d2c68f6bf37739 install.sh
5
+ bf9b79c2f3ced86064cb147e990996efd168c74bf41d0be2b7325abb3d021c8f mainplane-darwin-amd64
6
+ 10ee6ffcb10e8913a0d4bf3d03878d01b9fb986f7c93e0ea1fa670bd21a15667 mainplane-darwin-arm64
7
+ 3118c2791d4ad2462e1c15f23b200beed97c8415ea2cf9fb300009f244aadec8 mainplane-linux-amd64
8
+ 4d1ca60b708c3774c490470419135aaae9ce903ed06d09f1913e59b221c99f75 mainplane-linux-arm64
9
+ 2b2c48ac138c7d1c90001bddc16cd4bbf68bc6de0f70c43c42b8950c93bb896b mainplane-server-darwin-amd64
10
+ 2bd945795bbabaea1ea32d8a9d2a79500c03578bc71779d154d0a0c640ad08d6 mainplane-server-darwin-arm64
11
+ 84b24ba0ace69d1ffa8c47257ec1e261473b4561b17e40481a5a983a17353f1f mainplane-server-linux-amd64
12
+ 7548ccc1b31a8f173968a1b959c9986e9dc5bddce86b19274af0797a82e110e0 mainplane-server-linux-arm64
13
+ 1bcdc698e1654aab13ef4f9ecac85bc95e44062c3da88c16d7aebb0808e808e4 mainplane-server-windows-amd64.exe
14
+ 2bfa50f137e41b59dd44ece39dd1d4883f0db2de6cb28ba418dcd39d9503e845 mainplane-server-windows-arm64.exe
15
+ d430a12ccd4a66fa1b0f4868a38c9e62bf428b966b6c76e5275de3df6471d1f0 mainplane-windows-amd64.exe
16
+ a3727a82a1d1a6f4885cebfefdf7338178a15879a2a6c13870150453a4eafdb5 mainplane-windows-arm64.exe
mainplane/__init__.py ADDED
@@ -0,0 +1,45 @@
1
+ """Runs the mainplane CLI of this package's version. The first run downloads this machine's
2
+ release binary, checks it against the SHA256SUMS the release packed in here, and caches it."""
3
+
4
+ import hashlib
5
+ import os
6
+ import platform
7
+ import subprocess
8
+ import sys
9
+ import urllib.request
10
+ from importlib.metadata import version
11
+ from pathlib import Path
12
+
13
+
14
+ def main():
15
+ v = "v" + version("mainplane")
16
+ goos = {"linux": "linux", "darwin": "darwin", "win32": "windows"}.get(sys.platform)
17
+ arch = {"x86_64": "amd64", "amd64": "amd64", "arm64": "arm64", "aarch64": "arm64"}.get(platform.machine().lower())
18
+ if not goos or not arch:
19
+ sys.exit(f"mainplane: no mainplane build for {sys.platform} {platform.machine()}")
20
+ name = f"mainplane-{goos}-{arch}" + (".exe" if goos == "windows" else "")
21
+ sums = (Path(__file__).parent / "SHA256SUMS").read_text().splitlines()
22
+ line = next((l for l in sums if l.endswith(" " + name)), None)
23
+ if not line:
24
+ sys.exit(f"mainplane: release {v} has no {name}")
25
+ if goos == "windows":
26
+ cache = Path(os.environ["LOCALAPPDATA"])
27
+ elif goos == "darwin":
28
+ cache = Path.home() / "Library" / "Caches"
29
+ else:
30
+ cache = Path(os.environ.get("XDG_CACHE_HOME") or Path.home() / ".cache")
31
+ bin = cache / "mainplane" / v / ("mainplane.exe" if goos == "windows" else "mainplane")
32
+ if not bin.exists():
33
+ url = f"https://dl.mainplane.ai/{v}/{name}"
34
+ # Cloudflare refuses the default Python-urllib user agent
35
+ b = urllib.request.urlopen(urllib.request.Request(url, headers={"User-Agent": "mainplane-pypi/" + v})).read()
36
+ if hashlib.sha256(b).hexdigest() != line.split(" ")[0]:
37
+ sys.exit(f"mainplane: {url} does not match SHA256SUMS")
38
+ bin.parent.mkdir(parents=True, exist_ok=True)
39
+ tmp = bin.with_name(bin.name + ".tmp")
40
+ tmp.write_bytes(b)
41
+ tmp.chmod(0o755)
42
+ os.replace(tmp, bin)
43
+ if goos == "windows":
44
+ sys.exit(subprocess.call([str(bin), *sys.argv[1:]]))
45
+ os.execv(bin, [str(bin), *sys.argv[1:]])
@@ -0,0 +1,21 @@
1
+ Metadata-Version: 2.5
2
+ Name: mainplane
3
+ Version: 0.5.8
4
+ Summary: The open-source agent ecosystem. Agents that work across all your computers, browsers and files.
5
+ Project-URL: Homepage, https://mainplane.ai
6
+ Project-URL: Source, https://github.com/mainplane-ai/mainplane
7
+ License-Expression: MIT
8
+ Requires-Python: >=3.8
9
+ Description-Content-Type: text/markdown
10
+
11
+ # mainplane
12
+
13
+ The open-source agent ecosystem. Agents that work across all your computers, browsers and files.
14
+
15
+ This package runs the `mainplane` CLI. Its first run downloads the release binary for your machine from dl.mainplane.ai, checks it against the release's SHA256SUMS, and caches it.
16
+
17
+ ```
18
+ uvx mainplane --help
19
+ ```
20
+
21
+ To set up a harness, see https://github.com/mainplane-ai/mainplane.
@@ -0,0 +1,6 @@
1
+ mainplane/SHA256SUMS,sha256=QGdjHYtItBlMv7LiLnP0hfkceR1eZaV2FJUD9BIeVOg,1446
2
+ mainplane/__init__.py,sha256=rS49P3X46BI1dhi-IEreRZ1_zxdv1nY5htYWUarN7FA,2059
3
+ mainplane-0.5.8.dist-info/METADATA,sha256=bKIgX4cC5yyfqKK3b7yt7gU9i2rNswn3Ylu0sJoE8y4,744
4
+ mainplane-0.5.8.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
5
+ mainplane-0.5.8.dist-info/entry_points.txt,sha256=wG6WEb1da3vMBCV2sfmWkxl5dh91VBY7FAaWeq36H3I,45
6
+ mainplane-0.5.8.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ mainplane = mainplane:main