node-mantis 0.1.0a10__py3-none-macosx_11_0_arm64.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.
@@ -0,0 +1,101 @@
1
+ Metadata-Version: 2.4
2
+ Name: node-mantis
3
+ Version: 0.1.0a10
4
+ Summary: NodeMantis Python configuration, browser setup, and installation validation tools
5
+ Author: NodeMantis
6
+ License-Expression: LicenseRef-NodeMantis-Proprietary
7
+ Project-URL: Homepage, https://github.com/Node-Mantis/CleanSlate#readme
8
+ Project-URL: Repository, https://github.com/Node-Mantis/CleanSlate
9
+ Project-URL: Issues, https://github.com/Node-Mantis/CleanSlate/issues
10
+ Keywords: browser,automation,playwright,node-mantis,nodemantis
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Operating System :: MacOS
16
+ Classifier: Operating System :: Microsoft :: Windows
17
+ Classifier: Operating System :: POSIX :: Linux
18
+ Requires-Python: >=3.9
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE.txt
21
+ Provides-Extra: browser
22
+ Requires-Dist: playwright>=1.59.1; extra == "browser"
23
+ Dynamic: license-file
24
+
25
+ # NodeMantis Python
26
+
27
+ The NodeMantis Python SDK: browser-driving agent sessions at parity with the
28
+ npm `node-mantis` package, plus configuration, browser setup, and installation
29
+ validation tools.
30
+
31
+ Platform wheels bundle the same compiled native runtime the npm SDK uses; the
32
+ Python layer is a thin client that spawns it and forwards requests. Browser
33
+ sessions additionally need Playwright for Python (the `[browser]` extra) — the
34
+ runtime launches and drives a real Google Chrome through it.
35
+
36
+ Customer install:
37
+
38
+ ```bash
39
+ pip install "node-mantis[browser]"
40
+ python -m nodemantis configure --api-key "$NODEMANTIS_API_KEY"
41
+ python -m nodemantis install-browser --browser chrome
42
+ python -m nodemantis smoke
43
+ ```
44
+
45
+ Run a browser goal:
46
+
47
+ ```python
48
+ from nodemantis import NodeMantis
49
+
50
+ with NodeMantis.start(start_url="https://example.com", headless=True) as mantis:
51
+ result = mantis.run("Open the More information link.", max_iterations=5)
52
+ print(result.ok, result.reason)
53
+ ```
54
+
55
+ The session surface mirrors the TypeScript SDK: `NodeMantis.start()` /
56
+ `NodeMantis.preflight()`, and per-session `go`, `run`, `step`, `retrieve`,
57
+ `extract`, `check`, `close` (sessions are context managers). Options are
58
+ snake_case (`max_iterations`, `screenshot_enabled`, `result_schema`,
59
+ `allow_navigation`, …); `model` selects a size tier (`"small"`, `"standard"`,
60
+ `"large"`). `run`/`step` accept an `on_progress` callback for per-iteration
61
+ narration; callbacks arrive on a background thread and must not call session
62
+ methods. `retrieve` returns a discriminated result (`status` of `success`,
63
+ `not_found`, or `error`, with `data`, `contributor_ids`, `warnings`, `tokens`,
64
+ `final_url`). Schemas are plain JSON Schema dicts (pydantic v2 model classes
65
+ are also accepted). `attach()` and `context_options` are TypeScript-only.
66
+
67
+ API keys resolve from the `api_key` argument, then `NODEMANTIS_API_KEY`,
68
+ `NODEMANTIS_AUTH_TOKEN`, and finally the `nodemantis configure` config file.
69
+ The package always connects to the hosted Node Mantis API; the service
70
+ endpoint is not customer-configurable.
71
+
72
+ `node-mantis[browser]` installs Playwright for browser sessions, checks, and
73
+ smoke tests. Browser binaries are installed separately; run
74
+ `python -m nodemantis install-browser --browser chrome` for Google Chrome or
75
+ use `--browser chromium` for Playwright Chromium.
76
+
77
+ Installing the wheel also puts a `nodemantis` command on `PATH` (equivalent to
78
+ `python -m nodemantis`); `pipx install node-mantis` gives the same command in
79
+ an isolated environment. This CLI covers setup verbs only — `configure`,
80
+ `doctor`, `install-browser`, `smoke`. Command-line task execution
81
+ (`nodemantis run`, `nodemantis retrieve`) ships with the npm package:
82
+ `npm install -g node-mantis`. If both are installed, whichever is first on
83
+ `PATH` wins; the setup verbs behave identically.
84
+
85
+ Validate API access, credentials, and the selected browser from Python:
86
+
87
+ ```python
88
+ from nodemantis import preflight
89
+
90
+ report = preflight(check_browser_launch=True, timeout_seconds=5)
91
+ if not report.ok:
92
+ raise RuntimeError(report.checks)
93
+ ```
94
+
95
+ Supported alpha platforms: Linux x64, Windows x64, macOS x64, and macOS arm64.
96
+ Wheels without a bundled runtime (source-free builds) raise
97
+ `RUNTIME_NOT_INSTALLED` when starting a session; advanced setups can point
98
+ `NODEMANTIS_RUNTIME_PATH` at a runtime executable.
99
+
100
+ This package is proprietary alpha software. Use is governed by `LICENSE.txt`
101
+ and applicable NodeMantis terms.
@@ -0,0 +1,30 @@
1
+ node_mantis-0.1.0a10.dist-info/licenses/LICENSE.txt,sha256=GhWAtDo-CX1aQUTGoqDnWM8Jc0cP8uJjPNPi9cgoR3I,902
2
+ nodemantis/__init__.py,sha256=J7urZT0tLUBj5-oe5NTpA8X3iHua6DJxnJrvkFmMzHI,1652
3
+ nodemantis/__main__.py,sha256=MHKZ_ae3fSLGTLUUMOx15fWdeOnJSHhq-zslRP5F5Lc,79
4
+ nodemantis/_bridge.py,sha256=7Oov0gh6gVbRUFJVHJxuMP-BgVXhR7HbQVTYianAk34,30585
5
+ nodemantis/_constants.py,sha256=zK-cBJ0GApszOqpw_a4CU1YEzgry2pysHq-b_xx7yqE,50
6
+ nodemantis/_framing.py,sha256=7kbPDiTY6UrFCoisACbsaTtCS9ZcbMot5k4gHn0Wj4M,4541
7
+ nodemantis/_host.py,sha256=3SpIjAIvYIZ_sTkmfijsZ8NkbrO-GzYneTsoEbcPLNE,4807
8
+ nodemantis/_process.py,sha256=4an13j9cDc_E4SXvIyWrI15cBs36NqP_TZIpJsdUETY,17594
9
+ nodemantis/_protocol.py,sha256=SIJKLaEBqkv1FDZZ_3K3pg58aPTE6BT40sNOqdxlfBQ,3435
10
+ nodemantis/_rpc.py,sha256=ggeAEdtz2cUb7w1yVjH9dxOImmtjAHcjTZ9j9PgqILc,20218
11
+ nodemantis/browser.py,sha256=3-BcvgQlD1-9l0dkQ9O_JOxInhT7NKqfUhZ-A4ijFoQ,2416
12
+ nodemantis/cli.py,sha256=vo6zvka9oF-HkQrSE2Gk89fhqdTcPrX7RhhkthTfaFM,5105
13
+ nodemantis/config.py,sha256=pgrWoSCJcgY_cWInRJjFmH_S6t3muQI10TI2OPPfV4c,3453
14
+ nodemantis/errors.py,sha256=-0Tx-nwaxH7soShLMGYuO_U3l9YNSwCL7TPRMHb75Ks,3057
15
+ nodemantis/preflight.py,sha256=8LggeOB6m7sq5_3TPwzFYVvvCj4O2W_Xkw-DBI_xAuU,4205
16
+ nodemantis/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
17
+ nodemantis/runtime.py,sha256=zaHDIilBwQjcRUOaMtGEX-LNZ-YycZiijkPsxgDlq0o,2132
18
+ nodemantis/runtime_broker.py,sha256=PvTCoQnPKDzryopnsp5tHxPuziH-UiLmqy773Q98xMU,564
19
+ nodemantis/session.py,sha256=kp-ZQSj3EPgzVhub2gPCQQ2E4jl0haga0x8HcN7qRKA,19935
20
+ nodemantis/smoke.py,sha256=IYnaMeBpnKStmnDqUQBurieUPE77BF484OP9rVdwZV4,4718
21
+ nodemantis/types.py,sha256=zF_rgq25rHLX8aaXmQiw3OVCdLsyPfJ51s85pIDyUxk,9049
22
+ nodemantis/_runtime_bin/README.md,sha256=CJqRBCTQEkZTnNUS37gYi2RRK3ebYcxEODAfS2wfF-k,423
23
+ nodemantis/_runtime_bin/nodemantis-runtime,sha256=l0uhTb6ElLQmqHa1NzwhOJSy4lJ661X4jHID7wg_JGA,4661664
24
+ nodemantis/_runtime_bin/runtime-manifest.json,sha256=dxV6ebHF1fBQocIz1lXhVYskjkVESNcccIUOd3NyydM,279
25
+ nodemantis/fixtures/smoke.html,sha256=HlkvOyT-yfkelFQzUZz2-j1MDWHdeM7PqOSMiL-TVQY,668
26
+ node_mantis-0.1.0a10.dist-info/METADATA,sha256=Vkjr2sZmiA1hB3WbIPbzNUhdGPZzjQPDORUY65bWDOA,4448
27
+ node_mantis-0.1.0a10.dist-info/WHEEL,sha256=ZXH3vDMl8AFCSH5yRAEZvhxcAfU_WRPmBH7oy36RDKI,106
28
+ node_mantis-0.1.0a10.dist-info/entry_points.txt,sha256=iB3hkGF-CFZaPeeUadgxrljZqJV2FRCIClWIJGEK-hg,51
29
+ node_mantis-0.1.0a10.dist-info/top_level.txt,sha256=9kaSA3eSBIApvJUTG4Ni6h42DcfJebMhccQj_tS9Bu4,11
30
+ node_mantis-0.1.0a10.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (83.0.0)
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-macosx_11_0_arm64
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ nodemantis = nodemantis.cli:main
@@ -0,0 +1,18 @@
1
+ NodeMantis Alpha Proprietary License
2
+
3
+ Copyright (c) NodeMantis. All rights reserved.
4
+
5
+ This alpha package is proprietary software. You may install and use it only to
6
+ evaluate or access NodeMantis services under an active NodeMantis account,
7
+ agreement, or written authorization from NodeMantis.
8
+
9
+ You may not copy, redistribute, sublicense, sell, rent, lease, host for third
10
+ parties, or provide this software as a managed service without prior written
11
+ permission from NodeMantis. You may not reverse engineer, decompile, disassemble,
12
+ or attempt to derive source code from this software except to the extent that
13
+ applicable law prohibits this restriction.
14
+
15
+ This alpha software is provided "as is" without warranties of any kind. It may
16
+ change, break compatibility, or be withdrawn at any time. To the maximum extent
17
+ permitted by law, NodeMantis is not liable for damages arising from use of this
18
+ software.
@@ -0,0 +1 @@
1
+ nodemantis
nodemantis/__init__.py ADDED
@@ -0,0 +1,64 @@
1
+ """NodeMantis Python SDK: browser-driving sessions plus install/smoke helpers."""
2
+
3
+ from .config import ResolvedConfig, resolve_config
4
+ from .errors import (
5
+ NativeRuntimeExitedError,
6
+ NativeRuntimeHandshakeError,
7
+ NativeRuntimeResolutionError,
8
+ NativeRuntimeTerminationError,
9
+ NavigationOnlyError,
10
+ NodeMantisError,
11
+ RuntimeConnectionClosedError,
12
+ RuntimeRpcError,
13
+ SessionClosedError,
14
+ )
15
+ from .preflight import PreflightCheck, PreflightResult, preflight
16
+ from .runtime import UnsupportedPlatformError, runtime_platform_info
17
+ from .session import NodeMantis
18
+ from .smoke import SmokeResult, run_smoke
19
+ from .types import (
20
+ AgentOperationResult,
21
+ AgentProgressEvent,
22
+ AgentRetrieveResult,
23
+ BrowserGoResult,
24
+ MockLLMOptions,
25
+ MockLLMResponse,
26
+ MockLLMRule,
27
+ RetrievalPartialData,
28
+ RetrievalPartialRecord,
29
+ TokenUsage,
30
+ )
31
+
32
+ __all__ = [
33
+ "AgentOperationResult",
34
+ "AgentProgressEvent",
35
+ "AgentRetrieveResult",
36
+ "BrowserGoResult",
37
+ "MockLLMOptions",
38
+ "MockLLMResponse",
39
+ "MockLLMRule",
40
+ "NativeRuntimeExitedError",
41
+ "NativeRuntimeHandshakeError",
42
+ "NativeRuntimeResolutionError",
43
+ "NativeRuntimeTerminationError",
44
+ "NavigationOnlyError",
45
+ "NodeMantis",
46
+ "NodeMantisError",
47
+ "PreflightCheck",
48
+ "PreflightResult",
49
+ "ResolvedConfig",
50
+ "RetrievalPartialData",
51
+ "RetrievalPartialRecord",
52
+ "RuntimeConnectionClosedError",
53
+ "RuntimeRpcError",
54
+ "SessionClosedError",
55
+ "SmokeResult",
56
+ "TokenUsage",
57
+ "UnsupportedPlatformError",
58
+ "preflight",
59
+ "resolve_config",
60
+ "run_smoke",
61
+ "runtime_platform_info",
62
+ ]
63
+
64
+ __version__ = "0.1.0a10"
nodemantis/__main__.py ADDED
@@ -0,0 +1,4 @@
1
+ from .cli import main
2
+
3
+ if __name__ == "__main__":
4
+ raise SystemExit(main())