node9 0.2.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.
- node9/__init__.py +20 -0
- node9/_client.py +108 -0
- node9/_config.py +3 -0
- node9/_decorator.py +65 -0
- node9/_exceptions.py +21 -0
- node9-0.2.0.dist-info/METADATA +176 -0
- node9-0.2.0.dist-info/RECORD +9 -0
- node9-0.2.0.dist-info/WHEEL +4 -0
- node9-0.2.0.dist-info/licenses/LICENSE +183 -0
node9/__init__.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""
|
|
2
|
+
node9 — Execution security for Python AI agents.
|
|
3
|
+
|
|
4
|
+
Quick start:
|
|
5
|
+
from node9 import protect
|
|
6
|
+
|
|
7
|
+
@protect("write_file")
|
|
8
|
+
def write_file(path: str, content: str):
|
|
9
|
+
...
|
|
10
|
+
|
|
11
|
+
@protect("bash")
|
|
12
|
+
def run_shell(cmd: str):
|
|
13
|
+
...
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
from ._decorator import protect
|
|
17
|
+
from ._exceptions import ActionDeniedException, DaemonNotFoundError
|
|
18
|
+
|
|
19
|
+
__all__ = ["protect", "ActionDeniedException", "DaemonNotFoundError"]
|
|
20
|
+
__version__ = "0.1.0"
|
node9/_client.py
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Thin HTTP client — talks to the local Node9 daemon on localhost:7391.
|
|
3
|
+
|
|
4
|
+
Flow:
|
|
5
|
+
POST /check → { id } registers the action
|
|
6
|
+
GET /wait/:id → { decision, reason? } blocks until approved / denied
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import json
|
|
10
|
+
import os
|
|
11
|
+
import shutil
|
|
12
|
+
import subprocess
|
|
13
|
+
import time
|
|
14
|
+
import http.client
|
|
15
|
+
import urllib.error
|
|
16
|
+
import urllib.request
|
|
17
|
+
from typing import Any
|
|
18
|
+
|
|
19
|
+
from ._config import DAEMON_PORT
|
|
20
|
+
from ._exceptions import ActionDeniedException, DaemonNotFoundError
|
|
21
|
+
|
|
22
|
+
_DAEMON_BASE = f"http://127.0.0.1:{DAEMON_PORT}"
|
|
23
|
+
# The daemon auto-denies after ~55s; we wait slightly longer to get that response.
|
|
24
|
+
_CHECK_TIMEOUT = 5 # seconds to establish connection
|
|
25
|
+
_WAIT_TIMEOUT = 65 # seconds to wait for human decision
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _daemon_reachable() -> bool:
|
|
29
|
+
try:
|
|
30
|
+
req = urllib.request.Request(f"{_DAEMON_BASE}/settings", method="GET")
|
|
31
|
+
with urllib.request.urlopen(req, timeout=1.0):
|
|
32
|
+
return True
|
|
33
|
+
except urllib.error.URLError:
|
|
34
|
+
return False
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _auto_start_daemon() -> None:
|
|
38
|
+
"""Opt-in: start the daemon in the background when NODE9_AUTO_START=1."""
|
|
39
|
+
if shutil.which("node9"):
|
|
40
|
+
cmd = ["node9", "daemon"]
|
|
41
|
+
elif shutil.which("npx"):
|
|
42
|
+
cmd = ["npx", "@node9/proxy", "daemon"]
|
|
43
|
+
else:
|
|
44
|
+
raise DaemonNotFoundError(DAEMON_PORT)
|
|
45
|
+
subprocess.Popen(
|
|
46
|
+
cmd,
|
|
47
|
+
stdout=subprocess.DEVNULL,
|
|
48
|
+
stderr=subprocess.DEVNULL,
|
|
49
|
+
)
|
|
50
|
+
for _ in range(10):
|
|
51
|
+
time.sleep(0.5)
|
|
52
|
+
if _daemon_reachable():
|
|
53
|
+
return
|
|
54
|
+
raise DaemonNotFoundError(DAEMON_PORT)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _post(path: str, payload: dict) -> dict:
|
|
58
|
+
# default=str: safely serialize non-JSON-native objects (loggers, datetimes, etc.)
|
|
59
|
+
data = json.dumps(payload, default=str).encode()
|
|
60
|
+
req = urllib.request.Request(
|
|
61
|
+
f"{_DAEMON_BASE}{path}",
|
|
62
|
+
data=data,
|
|
63
|
+
headers={"Content-Type": "application/json"},
|
|
64
|
+
method="POST",
|
|
65
|
+
)
|
|
66
|
+
try:
|
|
67
|
+
with urllib.request.urlopen(req, timeout=_CHECK_TIMEOUT) as resp:
|
|
68
|
+
return json.loads(resp.read())
|
|
69
|
+
except urllib.error.URLError:
|
|
70
|
+
raise DaemonNotFoundError(DAEMON_PORT)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def _get(path: str) -> dict:
|
|
74
|
+
req = urllib.request.Request(f"{_DAEMON_BASE}{path}", method="GET")
|
|
75
|
+
try:
|
|
76
|
+
with urllib.request.urlopen(req, timeout=_WAIT_TIMEOUT) as resp:
|
|
77
|
+
return json.loads(resp.read())
|
|
78
|
+
except (urllib.error.URLError, http.client.HTTPException):
|
|
79
|
+
# URLError = timeout / connection error
|
|
80
|
+
# HTTPException (incl. RemoteDisconnected) = daemon closed connection → treat as deny
|
|
81
|
+
return {"decision": "deny", "reason": "Node9 daemon connection timed out or closed."}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
def evaluate(tool_name: str, args: dict[str, Any]) -> None:
|
|
85
|
+
"""
|
|
86
|
+
Sends the action to the daemon and blocks until a decision is made.
|
|
87
|
+
Raises ActionDeniedException if the action is denied.
|
|
88
|
+
Does nothing if NODE9_SKIP=1 is set (unsafe bypass for testing).
|
|
89
|
+
Set NODE9_AUTO_START=1 to automatically launch the daemon if it's not running.
|
|
90
|
+
"""
|
|
91
|
+
if os.environ.get("NODE9_SKIP") == "1":
|
|
92
|
+
return
|
|
93
|
+
|
|
94
|
+
if os.environ.get("NODE9_AUTO_START") == "1" and not _daemon_reachable():
|
|
95
|
+
_auto_start_daemon()
|
|
96
|
+
|
|
97
|
+
result = _post("/check", {"toolName": tool_name, "args": args, "cwd": os.getcwd(), "agent": "Python SDK"})
|
|
98
|
+
request_id = result.get("id")
|
|
99
|
+
if not request_id:
|
|
100
|
+
raise RuntimeError(f"[Node9] Unexpected daemon response: {result}")
|
|
101
|
+
|
|
102
|
+
print(f"🛡️ Node9: waiting for approval of '{tool_name}'...", flush=True)
|
|
103
|
+
decision_result = _get(f"/wait/{request_id}")
|
|
104
|
+
decision = decision_result.get("decision", "deny")
|
|
105
|
+
|
|
106
|
+
if decision != "allow":
|
|
107
|
+
reason = decision_result.get("reason", "Denied by Node9 policy")
|
|
108
|
+
raise ActionDeniedException(tool_name, reason)
|
node9/_config.py
ADDED
node9/_decorator.py
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import functools
|
|
3
|
+
import inspect
|
|
4
|
+
from typing import Any, Callable, Optional
|
|
5
|
+
|
|
6
|
+
from ._client import evaluate
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def _capture_args(func: Callable, params: Optional[Callable], *args: Any, **kwargs: Any) -> dict:
|
|
10
|
+
if params is not None:
|
|
11
|
+
return params(*args, **kwargs)
|
|
12
|
+
sig = inspect.signature(func)
|
|
13
|
+
bound = sig.bind(*args, **kwargs)
|
|
14
|
+
bound.apply_defaults()
|
|
15
|
+
return dict(bound.arguments)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def protect(
|
|
19
|
+
tool_name: Optional[str] = None,
|
|
20
|
+
*,
|
|
21
|
+
params: Optional[Callable[..., dict]] = None,
|
|
22
|
+
):
|
|
23
|
+
"""
|
|
24
|
+
Decorator that intercepts a function call and asks Node9 for approval.
|
|
25
|
+
|
|
26
|
+
Works with both sync and async functions.
|
|
27
|
+
|
|
28
|
+
Usage:
|
|
29
|
+
@protect("write_file")
|
|
30
|
+
def write_file(path: str, content: str): ...
|
|
31
|
+
|
|
32
|
+
@protect("bash", params=lambda cmd, **_: {"command": cmd})
|
|
33
|
+
async def run_shell(cmd: str): ...
|
|
34
|
+
|
|
35
|
+
If no `params` lambda is provided, all arguments are captured automatically
|
|
36
|
+
using inspect.signature — no configuration needed.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
def decorator(func: Callable) -> Callable:
|
|
40
|
+
name = tool_name or func.__name__
|
|
41
|
+
|
|
42
|
+
if inspect.iscoroutinefunction(func):
|
|
43
|
+
@functools.wraps(func)
|
|
44
|
+
async def async_wrapper(*args: Any, **kwargs: Any) -> Any:
|
|
45
|
+
captured = _capture_args(func, params, *args, **kwargs)
|
|
46
|
+
# Run blocking HTTP call in a thread to avoid blocking the event loop
|
|
47
|
+
await asyncio.to_thread(evaluate, name, captured)
|
|
48
|
+
return await func(*args, **kwargs)
|
|
49
|
+
return async_wrapper
|
|
50
|
+
|
|
51
|
+
@functools.wraps(func)
|
|
52
|
+
def wrapper(*args: Any, **kwargs: Any) -> Any:
|
|
53
|
+
captured = _capture_args(func, params, *args, **kwargs)
|
|
54
|
+
evaluate(name, captured)
|
|
55
|
+
return func(*args, **kwargs)
|
|
56
|
+
|
|
57
|
+
return wrapper
|
|
58
|
+
|
|
59
|
+
# Support both @protect and @protect("name") usage
|
|
60
|
+
if callable(tool_name):
|
|
61
|
+
func = tool_name
|
|
62
|
+
tool_name = func.__name__
|
|
63
|
+
return decorator(func)
|
|
64
|
+
|
|
65
|
+
return decorator
|
node9/_exceptions.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
class ActionDeniedException(Exception):
|
|
2
|
+
"""Raised when Node9 blocks an agent action."""
|
|
3
|
+
|
|
4
|
+
def __init__(self, tool_name: str, reason: str = "Denied by Node9 policy"):
|
|
5
|
+
self.tool_name = tool_name
|
|
6
|
+
self.reason = reason
|
|
7
|
+
# negotiation: ready-made string for feeding back to the LLM
|
|
8
|
+
self.negotiation = f"Action '{tool_name}' was blocked by Node9: {reason}. Choose a different approach."
|
|
9
|
+
super().__init__(f"[Node9] Action '{tool_name}' was blocked: {reason}")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class DaemonNotFoundError(Exception):
|
|
13
|
+
"""Raised when the Node9 daemon is not reachable."""
|
|
14
|
+
|
|
15
|
+
def __init__(self, port: int = 7391):
|
|
16
|
+
super().__init__(
|
|
17
|
+
f"Node9 daemon not found on localhost:{port}.\n"
|
|
18
|
+
f"To enable execution security, run:\n"
|
|
19
|
+
f" npx @node9/proxy daemon\n"
|
|
20
|
+
f"or set NODE9_SKIP=1 to bypass (unsafe)."
|
|
21
|
+
)
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: node9
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Execution security for Python AI agents — seatbelt for LangChain, CrewAI, and plain Python.
|
|
5
|
+
Project-URL: Homepage, https://node9.ai
|
|
6
|
+
Project-URL: Repository, https://github.com/node9-ai/node9-python
|
|
7
|
+
Project-URL: Documentation, https://node9.ai/docs
|
|
8
|
+
License: Apache-2.0
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: agents,ai,crewai,langchain,llm,security
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Security
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# node9-python
|
|
24
|
+
|
|
25
|
+
Execution security for Python AI agents — one decorator, zero config.
|
|
26
|
+
|
|
27
|
+
Works with any framework: plain Python, LangChain, CrewAI, LangGraph, or custom agents.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
pip install node9
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
**1. Start the Node9 daemon** (ships with `@node9/proxy`):
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npx @node9/proxy daemon
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**2. Add `@protect` to any function your agent calls:**
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
from node9 import protect, ActionDeniedException
|
|
47
|
+
|
|
48
|
+
@protect
|
|
49
|
+
def write_file(path: str, content: str) -> None:
|
|
50
|
+
with open(path, "w") as f:
|
|
51
|
+
f.write(content)
|
|
52
|
+
|
|
53
|
+
@protect("bash")
|
|
54
|
+
def run_shell(command: str) -> str:
|
|
55
|
+
import subprocess
|
|
56
|
+
return subprocess.check_output(command, shell=True, text=True)
|
|
57
|
+
|
|
58
|
+
# When your agent calls this, Node9 intercepts it and asks for approval.
|
|
59
|
+
# The call blocks until a human approves or denies — in the dashboard or Slack.
|
|
60
|
+
try:
|
|
61
|
+
write_file("/etc/hosts", "malicious content")
|
|
62
|
+
except ActionDeniedException as e:
|
|
63
|
+
print(f"Blocked: {e}")
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
That's it. All function arguments are captured automatically — no config needed.
|
|
67
|
+
|
|
68
|
+
## How It Works
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
Agent calls write_file()
|
|
72
|
+
↓
|
|
73
|
+
@protect intercepts
|
|
74
|
+
↓
|
|
75
|
+
POST /check → Node9 daemon (localhost:7391)
|
|
76
|
+
↓
|
|
77
|
+
Daemon shows approval popup / sends Slack message
|
|
78
|
+
↓
|
|
79
|
+
Human approves or denies
|
|
80
|
+
↓
|
|
81
|
+
Function runs (or ActionDeniedException is raised)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Async Support
|
|
85
|
+
|
|
86
|
+
`@protect` works with `async def` out of the box. The blocking HTTP call runs in a thread so it never freezes your event loop:
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
@protect("write_file")
|
|
90
|
+
async def write_file(path: str, content: str) -> str:
|
|
91
|
+
async with aiofiles.open(path, "w") as f:
|
|
92
|
+
await f.write(content)
|
|
93
|
+
return f"Written to {path}"
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
This makes it compatible with LangGraph, FastMCP, and any other async agent framework.
|
|
97
|
+
|
|
98
|
+
## Custom Tool Name
|
|
99
|
+
|
|
100
|
+
By default, the tool name sent to Node9 is the function name. Override it:
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
@protect("postgres_query")
|
|
104
|
+
def execute_sql(sql: str, db: str = "prod") -> list:
|
|
105
|
+
...
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Custom Params
|
|
109
|
+
|
|
110
|
+
Control exactly what gets sent to the approval UI:
|
|
111
|
+
|
|
112
|
+
```python
|
|
113
|
+
@protect("deploy", params=lambda service, env="prod", **_: {"service": service, "env": env})
|
|
114
|
+
def deploy(service: str, env: str = "prod", dry_run: bool = False) -> str:
|
|
115
|
+
...
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Handling Denials in LLM Feedback Loops
|
|
119
|
+
|
|
120
|
+
`ActionDeniedException` has a `negotiation` property — a ready-made string you can feed back to the LLM so it can try a different approach instead of crashing:
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
try:
|
|
124
|
+
delete_file("/etc/hosts")
|
|
125
|
+
except ActionDeniedException as e:
|
|
126
|
+
# e.negotiation = "Action 'delete_file' was blocked by Node9: Too dangerous. Choose a different approach."
|
|
127
|
+
response = llm.invoke(e.negotiation)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Framework Examples
|
|
131
|
+
|
|
132
|
+
### LangChain
|
|
133
|
+
|
|
134
|
+
```python
|
|
135
|
+
from langchain.tools import BaseTool
|
|
136
|
+
from node9 import protect
|
|
137
|
+
|
|
138
|
+
class WriteFileTool(BaseTool):
|
|
139
|
+
name = "write_file"
|
|
140
|
+
description = "Write content to a file."
|
|
141
|
+
|
|
142
|
+
@protect("write_file")
|
|
143
|
+
def _run(self, path: str, content: str) -> str:
|
|
144
|
+
with open(path, "w") as f:
|
|
145
|
+
f.write(content)
|
|
146
|
+
return f"Written to {path}"
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### CrewAI
|
|
150
|
+
|
|
151
|
+
```python
|
|
152
|
+
from crewai.tools import tool
|
|
153
|
+
from node9 import protect
|
|
154
|
+
|
|
155
|
+
@tool("write_file")
|
|
156
|
+
@protect("write_file")
|
|
157
|
+
def write_file(path: str, content: str) -> str:
|
|
158
|
+
"""Write content to a file."""
|
|
159
|
+
with open(path, "w") as f:
|
|
160
|
+
f.write(content)
|
|
161
|
+
return f"Written to {path}"
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
See [`examples/`](examples/) for full runnable examples.
|
|
165
|
+
|
|
166
|
+
## Environment Variables
|
|
167
|
+
|
|
168
|
+
| Variable | Default | Description |
|
|
169
|
+
|---|---|---|
|
|
170
|
+
| `NODE9_DAEMON_PORT` | `7391` | Daemon port |
|
|
171
|
+
| `NODE9_AUTO_START` | — | Set to `1` to auto-launch the daemon if it's not running |
|
|
172
|
+
| `NODE9_SKIP` | — | Set to `1` to bypass all checks (unsafe — for tests only) |
|
|
173
|
+
|
|
174
|
+
## License
|
|
175
|
+
|
|
176
|
+
Apache-2.0
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
node9/__init__.py,sha256=SOTNlhXd1yPbpQZbuLU2eQVNXF4dJJJZ3OIQUi4R5n8,445
|
|
2
|
+
node9/_client.py,sha256=-UEYqYhI-1xJq_uWFA6YJpfqiI8SrhlLffKF5mkHMjU,3771
|
|
3
|
+
node9/_config.py,sha256=myMbx4931AX3u9GtdE___0mY8406wmZMU2Ovh5BvokY,74
|
|
4
|
+
node9/_decorator.py,sha256=QFjji5D_3Oh0Y_y78jAoXya8JoimDBQCL_IcFbcLL7Y,2018
|
|
5
|
+
node9/_exceptions.py,sha256=QR_TZFbZzzf1Ys81L-8Rh3vmqP31Yc1bib2xgoz16QA,885
|
|
6
|
+
node9-0.2.0.dist-info/METADATA,sha256=1I8HjWL10ZEbI9NtjyamaUoSfAcR8aFtMb5Pa_528XI,4693
|
|
7
|
+
node9-0.2.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
8
|
+
node9-0.2.0.dist-info/licenses/LICENSE,sha256=qrLHZ6kj7-VPCZtYqV-QeckNfeA0QjEc4SqTXjvuC5o,10322
|
|
9
|
+
node9-0.2.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship made available under
|
|
36
|
+
the License, as indicated by a copyright notice that is included in
|
|
37
|
+
or attached to the work (an example is provided in the Appendix below).
|
|
38
|
+
|
|
39
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
|
+
form, that is based on (or derived from) the Work and for which the
|
|
41
|
+
editorial revisions, annotations, elaborations, or other transformations
|
|
42
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
43
|
+
of this License, Derivative Works shall not include works that remain
|
|
44
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
45
|
+
the Work and the Derivative Works thereof.
|
|
46
|
+
|
|
47
|
+
"Contribution" shall mean, as submitted to the Licensor for inclusion
|
|
48
|
+
in the Work by the copyright owner or by an individual or Legal Entity
|
|
49
|
+
authorized to submit on behalf of the copyright owner. For the purposes
|
|
50
|
+
of this definition, "submitted" means any form of electronic, verbal,
|
|
51
|
+
or written communication sent to the Licensor or its representatives,
|
|
52
|
+
including but not limited to communication on electronic mailing lists,
|
|
53
|
+
source code control systems, and issue tracking systems that are managed
|
|
54
|
+
by, or on behalf of, the Licensor for the purpose of discussing and
|
|
55
|
+
improving the Work, but excluding communication that is conspicuously
|
|
56
|
+
marked or designated in writing by the copyright owner as "Not a
|
|
57
|
+
Contribution."
|
|
58
|
+
|
|
59
|
+
"Contributor" shall mean Licensor and any Legal Entity on behalf of
|
|
60
|
+
whom a Contribution has been received by the Licensor and included
|
|
61
|
+
within the Work.
|
|
62
|
+
|
|
63
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
64
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
65
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
66
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
67
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
68
|
+
Work and such Derivative Works in Source or Object form.
|
|
69
|
+
|
|
70
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
71
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
72
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
73
|
+
(except as stated in this section) patent license to make, have made,
|
|
74
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
75
|
+
where such license applies only to those patent claims licensable
|
|
76
|
+
by such Contributor that are necessarily infringed by their
|
|
77
|
+
Contribution(s) alone or by the combination of their Contribution(s)
|
|
78
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
79
|
+
institute patent litigation against any entity (including a cross-claim
|
|
80
|
+
or counterclaim in a lawsuit) alleging that the Work or any Contribution
|
|
81
|
+
embodied within the Work constitutes direct or contributory patent
|
|
82
|
+
infringement, then any patent licenses granted to You under this License
|
|
83
|
+
for that Work shall terminate as of the date such litigation is filed.
|
|
84
|
+
|
|
85
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
86
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
87
|
+
modifications, and in Source or Object form, provided that You
|
|
88
|
+
meet the following conditions:
|
|
89
|
+
|
|
90
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
91
|
+
Works a copy of this License; and
|
|
92
|
+
|
|
93
|
+
(b) You must cause any modified files to carry prominent notices
|
|
94
|
+
stating that You changed the files; and
|
|
95
|
+
|
|
96
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
97
|
+
that You distribute, all copyright, patent, trademark, and
|
|
98
|
+
attribution notices from the Source form of the Work,
|
|
99
|
+
excluding those notices that do not pertain to any part of
|
|
100
|
+
the Derivative Works; and
|
|
101
|
+
|
|
102
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
103
|
+
distribution, You must include a readable copy of the
|
|
104
|
+
attribution notices contained within such NOTICE file, in
|
|
105
|
+
at least one of the following places: within a NOTICE text
|
|
106
|
+
file distributed as part of the Derivative Works; within
|
|
107
|
+
the Source form or documentation, if provided along with the
|
|
108
|
+
Derivative Works; or, within a display generated by the
|
|
109
|
+
Derivative Works, if and wherever such third-party notices
|
|
110
|
+
normally appear. The contents of the NOTICE file are for
|
|
111
|
+
informational purposes only and do not modify the License.
|
|
112
|
+
You may add Your own attribution notices within Derivative
|
|
113
|
+
Works that You distribute, alongside or in addition to the
|
|
114
|
+
NOTICE text from the Work, provided that such additional
|
|
115
|
+
attribution notices cannot be construed as modifying the License.
|
|
116
|
+
|
|
117
|
+
You may add Your own license statement for Your modifications and
|
|
118
|
+
may provide additional grant of rights to use, reproduce, modify,
|
|
119
|
+
prepare Derivative Works of, convert to other formats, and distribute
|
|
120
|
+
the contributions, provided such additional grant of rights does not
|
|
121
|
+
conflict with the terms and conditions of this License.
|
|
122
|
+
|
|
123
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
124
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
125
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
126
|
+
this License, without any additional terms or conditions.
|
|
127
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
128
|
+
the terms of any separate license agreement you may have executed
|
|
129
|
+
with Licensor regarding such Contributions.
|
|
130
|
+
|
|
131
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
132
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
133
|
+
except as required for reasonable and customary use in describing the
|
|
134
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
135
|
+
|
|
136
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
137
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
138
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
139
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
140
|
+
implied, including, without limitation, any warranties or conditions
|
|
141
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
142
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
143
|
+
appropriateness of using or reproducing the Work and assume any
|
|
144
|
+
risks associated with Your exercise of permissions under this License.
|
|
145
|
+
|
|
146
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
147
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
148
|
+
unless required by applicable law (such as deliberate and grossly
|
|
149
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
150
|
+
liable to You for damages, including any direct, indirect, special,
|
|
151
|
+
incidental, or exemplary damages of any character arising as a
|
|
152
|
+
result of this License or out of the use or inability to use the
|
|
153
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
154
|
+
work stoppage, computer failure or malfunction, or all other
|
|
155
|
+
commercial damages or losses), even if such Contributor has been
|
|
156
|
+
advised of the possibility of such damages.
|
|
157
|
+
|
|
158
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
159
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
160
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
161
|
+
or other liability obligations and/or rights consistent with this
|
|
162
|
+
License. However, in accepting such obligations, You may offer such
|
|
163
|
+
obligations only on Your own behalf and on Your sole responsibility,
|
|
164
|
+
not on behalf of any other Contributor, and only if You agree to
|
|
165
|
+
indemnify, defend, and hold each Contributor harmless for any
|
|
166
|
+
liability incurred by, or claims asserted against, such Contributor
|
|
167
|
+
by reason of your accepting any such warranty or additional liability.
|
|
168
|
+
|
|
169
|
+
END OF TERMS AND CONDITIONS
|
|
170
|
+
|
|
171
|
+
Copyright 2026 Node9 AI
|
|
172
|
+
|
|
173
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
174
|
+
you may not use this file except in compliance with the License.
|
|
175
|
+
You may obtain a copy of the License at
|
|
176
|
+
|
|
177
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
178
|
+
|
|
179
|
+
Unless required by applicable law or agreed to in writing, software
|
|
180
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
181
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
182
|
+
See the License for the specific language governing permissions and
|
|
183
|
+
limitations under the License.
|