agentdbg 0.1.0__tar.gz
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.
- agentdbg-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- agentdbg-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- agentdbg-0.1.0/.github/workflows/lint-format.yml +11 -0
- agentdbg-0.1.0/.github/workflows/runapp.yml +94 -0
- agentdbg-0.1.0/.github/workflows/unittest-fast.yml +37 -0
- agentdbg-0.1.0/.gitignore +33 -0
- agentdbg-0.1.0/.pre-commit-config.yaml +17 -0
- agentdbg-0.1.0/.python-version +1 -0
- agentdbg-0.1.0/CONTRIBUTING.md +100 -0
- agentdbg-0.1.0/LICENSE +189 -0
- agentdbg-0.1.0/PKG-INFO +313 -0
- agentdbg-0.1.0/README.md +286 -0
- agentdbg-0.1.0/SECURITY.md +5 -0
- agentdbg-0.1.0/agentdbg/__init__.py +19 -0
- agentdbg-0.1.0/agentdbg/_integration_utils.py +75 -0
- agentdbg-0.1.0/agentdbg/_tracing/__init__.py +24 -0
- agentdbg-0.1.0/agentdbg/_tracing/_context.py +204 -0
- agentdbg-0.1.0/agentdbg/_tracing/_lifecycle.py +153 -0
- agentdbg-0.1.0/agentdbg/_tracing/_recorders.py +153 -0
- agentdbg-0.1.0/agentdbg/_tracing/_redact.py +176 -0
- agentdbg-0.1.0/agentdbg/_version.py +2 -0
- agentdbg-0.1.0/agentdbg/cli.py +233 -0
- agentdbg-0.1.0/agentdbg/config.py +175 -0
- agentdbg-0.1.0/agentdbg/constants.py +21 -0
- agentdbg-0.1.0/agentdbg/events.py +116 -0
- agentdbg-0.1.0/agentdbg/integrations/__init__.py +16 -0
- agentdbg-0.1.0/agentdbg/integrations/_error.py +2 -0
- agentdbg-0.1.0/agentdbg/integrations/crewai.py +387 -0
- agentdbg-0.1.0/agentdbg/integrations/langchain.py +242 -0
- agentdbg-0.1.0/agentdbg/loopdetect.py +82 -0
- agentdbg-0.1.0/agentdbg/server.py +111 -0
- agentdbg-0.1.0/agentdbg/storage.py +336 -0
- agentdbg-0.1.0/agentdbg/tracing.py +21 -0
- agentdbg-0.1.0/agentdbg/ui_static/app.js +526 -0
- agentdbg-0.1.0/agentdbg/ui_static/favicon.svg +4 -0
- agentdbg-0.1.0/agentdbg/ui_static/index.html +49 -0
- agentdbg-0.1.0/agentdbg/ui_static/styles.css +270 -0
- agentdbg-0.1.0/docs/.gitignore +1 -0
- agentdbg-0.1.0/docs/architecture.md +82 -0
- agentdbg-0.1.0/docs/assets/dashboard.png +0 -0
- agentdbg-0.1.0/docs/assets/timeline-langchain.gif +0 -0
- agentdbg-0.1.0/docs/assets/timeline-pure-python.gif +0 -0
- agentdbg-0.1.0/docs/cli.md +99 -0
- agentdbg-0.1.0/docs/getting-started.md +100 -0
- agentdbg-0.1.0/docs/index.md +61 -0
- agentdbg-0.1.0/docs/integrations.md +73 -0
- agentdbg-0.1.0/docs/reference/config.md +159 -0
- agentdbg-0.1.0/docs/reference/trace-format.md +207 -0
- agentdbg-0.1.0/docs/sdk.md +229 -0
- agentdbg-0.1.0/examples/demo/langchain.py +88 -0
- agentdbg-0.1.0/examples/demo/pure_python.py +106 -0
- agentdbg-0.1.0/examples/langchain/.gitignore +13 -0
- agentdbg-0.1.0/examples/langchain/_customer_support/README.md +13 -0
- agentdbg-0.1.0/examples/langchain/_customer_support/__init__.py +0 -0
- agentdbg-0.1.0/examples/langchain/_customer_support/agent.py +111 -0
- agentdbg-0.1.0/examples/langchain/_customer_support/car_rentals.py +147 -0
- agentdbg-0.1.0/examples/langchain/_customer_support/company_policies.py +79 -0
- agentdbg-0.1.0/examples/langchain/_customer_support/database.py +81 -0
- agentdbg-0.1.0/examples/langchain/_customer_support/excursions.py +138 -0
- agentdbg-0.1.0/examples/langchain/_customer_support/flights.py +204 -0
- agentdbg-0.1.0/examples/langchain/_customer_support/graph.py +31 -0
- agentdbg-0.1.0/examples/langchain/_customer_support/hotels.py +145 -0
- agentdbg-0.1.0/examples/langchain/_customer_support/prereq.py +12 -0
- agentdbg-0.1.0/examples/langchain/_customer_support/state.py +9 -0
- agentdbg-0.1.0/examples/langchain/_customer_support/utilities.py +57 -0
- agentdbg-0.1.0/examples/langchain/customer_support.py +112 -0
- agentdbg-0.1.0/examples/langchain/minimal.py +36 -0
- agentdbg-0.1.0/examples/langchain/pyproject.toml +17 -0
- agentdbg-0.1.0/examples/minimal/pyproject.toml +7 -0
- agentdbg-0.1.0/examples/minimal/simple_agent.py +28 -0
- agentdbg-0.1.0/pyproject.toml +67 -0
- agentdbg-0.1.0/ruff.toml +83 -0
- agentdbg-0.1.0/schemas/event.schema.json +23 -0
- agentdbg-0.1.0/schemas/run.schema.json +30 -0
- agentdbg-0.1.0/scripts/smoke_path_traversal.sh +43 -0
- agentdbg-0.1.0/tests/conftest.py +40 -0
- agentdbg-0.1.0/tests/test_cli.py +205 -0
- agentdbg-0.1.0/tests/test_config.py +130 -0
- agentdbg-0.1.0/tests/test_crewai_integration.py +342 -0
- agentdbg-0.1.0/tests/test_events.py +35 -0
- agentdbg-0.1.0/tests/test_implicit_run.py +67 -0
- agentdbg-0.1.0/tests/test_integration_run_lifecycle.py +128 -0
- agentdbg-0.1.0/tests/test_langchain_integration.py +167 -0
- agentdbg-0.1.0/tests/test_loopdetect.py +122 -0
- agentdbg-0.1.0/tests/test_redaction.py +299 -0
- agentdbg-0.1.0/tests/test_server.py +100 -0
- agentdbg-0.1.0/tests/test_server_path_traversal.py +76 -0
- agentdbg-0.1.0/tests/test_storage.py +235 -0
- agentdbg-0.1.0/tests/test_tracing.py +413 -0
- agentdbg-0.1.0/uv.lock +4248 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: "[BUG]"
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: z-a-f
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. Go to '...'
|
|
16
|
+
2. Click on '....'
|
|
17
|
+
3. Scroll down to '....'
|
|
18
|
+
4. See error
|
|
19
|
+
|
|
20
|
+
**Expected behavior**
|
|
21
|
+
A clear and concise description of what you expected to happen.
|
|
22
|
+
|
|
23
|
+
**Screenshots**
|
|
24
|
+
If applicable, add screenshots to help explain your problem.
|
|
25
|
+
|
|
26
|
+
**Desktop (please complete the following information):**
|
|
27
|
+
- OS: [e.g. iOS]
|
|
28
|
+
- Browser [e.g. chrome, safari]
|
|
29
|
+
- Version [e.g. 22]
|
|
30
|
+
|
|
31
|
+
**Smartphone (please complete the following information):**
|
|
32
|
+
- Device: [e.g. iPhone6]
|
|
33
|
+
- OS: [e.g. iOS8.1]
|
|
34
|
+
- Browser [e.g. stock browser, safari]
|
|
35
|
+
- Version [e.g. 22]
|
|
36
|
+
|
|
37
|
+
**Additional context**
|
|
38
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
name: Run app + smoke
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches: [main]
|
|
5
|
+
paths:
|
|
6
|
+
- agentdbg/**
|
|
7
|
+
- scripts/**
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
PYTHON_VERSION: "3.10"
|
|
11
|
+
UV_VERSION: "0.10.2"
|
|
12
|
+
APP_HOST: "127.0.0.1"
|
|
13
|
+
APP_PORT: "8712"
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
smoke-path-traversal:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
timeout-minutes: 15
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v6
|
|
22
|
+
|
|
23
|
+
- name: Install uv
|
|
24
|
+
uses: astral-sh/setup-uv@v7
|
|
25
|
+
with:
|
|
26
|
+
version: ${{ env.UV_VERSION }}
|
|
27
|
+
python-version: ${{ env.PYTHON_VERSION }}
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: uv sync --all-extras --dev
|
|
31
|
+
|
|
32
|
+
- name: Start app (background)
|
|
33
|
+
shell: bash
|
|
34
|
+
run: |
|
|
35
|
+
set -euo pipefail
|
|
36
|
+
uv run agentdbg view \
|
|
37
|
+
--host "${APP_HOST}" \
|
|
38
|
+
--port "${APP_PORT}" \
|
|
39
|
+
--no-browser \
|
|
40
|
+
> server.log 2>&1 &
|
|
41
|
+
|
|
42
|
+
echo $! > server.pid
|
|
43
|
+
echo "Server PID: $(cat server.pid)"
|
|
44
|
+
|
|
45
|
+
- name: Wait for app to be ready
|
|
46
|
+
shell: bash
|
|
47
|
+
run: |
|
|
48
|
+
set -euo pipefail
|
|
49
|
+
|
|
50
|
+
# If you have a /health endpoint, use that instead of /
|
|
51
|
+
URL="http://${APP_HOST}:${APP_PORT}/"
|
|
52
|
+
|
|
53
|
+
for i in {1..60}; do
|
|
54
|
+
if curl -fsS "$URL" >/dev/null; then
|
|
55
|
+
echo "App is up!"
|
|
56
|
+
exit 0
|
|
57
|
+
fi
|
|
58
|
+
sleep 1
|
|
59
|
+
done
|
|
60
|
+
|
|
61
|
+
echo "App did not become ready in time"
|
|
62
|
+
echo "---- server.log ----"
|
|
63
|
+
tail -n 200 server.log || true
|
|
64
|
+
exit 1
|
|
65
|
+
|
|
66
|
+
- name: Run smoke test(s)
|
|
67
|
+
run: |
|
|
68
|
+
scripts/smoke_path_traversal.sh "http://${APP_HOST}:${APP_PORT}"
|
|
69
|
+
|
|
70
|
+
- name: Stop app (always)
|
|
71
|
+
if: always()
|
|
72
|
+
shell: bash
|
|
73
|
+
run: |
|
|
74
|
+
set +e
|
|
75
|
+
if [[ -f server.pid ]]; then
|
|
76
|
+
PID="$(cat server.pid)"
|
|
77
|
+
echo "Stopping server PID $PID"
|
|
78
|
+
kill "$PID" 2>/dev/null || true
|
|
79
|
+
|
|
80
|
+
# Give it a moment, then hard kill if needed
|
|
81
|
+
for i in {1..10}; do
|
|
82
|
+
kill -0 "$PID" 2>/dev/null || exit 0
|
|
83
|
+
sleep 1
|
|
84
|
+
done
|
|
85
|
+
echo "Force killing $PID"
|
|
86
|
+
kill -9 "$PID" 2>/dev/null || true
|
|
87
|
+
fi
|
|
88
|
+
|
|
89
|
+
- name: Upload server log (on failure)
|
|
90
|
+
if: failure()
|
|
91
|
+
uses: actions/upload-artifact@v6
|
|
92
|
+
with:
|
|
93
|
+
name: server-log
|
|
94
|
+
path: server.log
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Run unit tests on push and pull_request.
|
|
2
|
+
# Python 3.10+, uv-managed, pytest.
|
|
3
|
+
name: Fast unittests
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
paths:
|
|
8
|
+
- pyproject.toml
|
|
9
|
+
- agentdbg/**
|
|
10
|
+
- tests/**
|
|
11
|
+
pull_request:
|
|
12
|
+
branches: [main]
|
|
13
|
+
paths:
|
|
14
|
+
- pyproject.toml
|
|
15
|
+
- agentdbg/**
|
|
16
|
+
- tests/**
|
|
17
|
+
|
|
18
|
+
env:
|
|
19
|
+
UV_VERSION: "0.10.2"
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
unittest-fast:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
strategy:
|
|
25
|
+
matrix:
|
|
26
|
+
python-version: ["3.10", "3.12", "3.13"]
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v6
|
|
29
|
+
- name: Install uv
|
|
30
|
+
uses: astral-sh/setup-uv@v7
|
|
31
|
+
with:
|
|
32
|
+
version: ${{ env.UV_VERSION }}
|
|
33
|
+
python-version: ${{ matrix.python-version }}
|
|
34
|
+
- name: Install dependencies
|
|
35
|
+
run: uv sync --all-extras --dev
|
|
36
|
+
- name: Run tests
|
|
37
|
+
run: uv run pytest -vm "not slow and not long and not longrunning"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Local traces
|
|
2
|
+
# We ignore all JSON and JSONL files except under `schemas`
|
|
3
|
+
# This behavior might change in the future.
|
|
4
|
+
**/.agentdbg/
|
|
5
|
+
*.json
|
|
6
|
+
*.jsonl
|
|
7
|
+
!schemas/*.json
|
|
8
|
+
!schemas/*.jsonl
|
|
9
|
+
|
|
10
|
+
# Instruction sets for AI to follow -- these constantly change
|
|
11
|
+
ai/
|
|
12
|
+
.cursor/
|
|
13
|
+
.cursorignore
|
|
14
|
+
|
|
15
|
+
# Python-generated files
|
|
16
|
+
**/__pycache__/
|
|
17
|
+
**/*.py[oc]
|
|
18
|
+
build/
|
|
19
|
+
dist/
|
|
20
|
+
wheels/
|
|
21
|
+
*.egg-info
|
|
22
|
+
|
|
23
|
+
# Test files
|
|
24
|
+
.coverage
|
|
25
|
+
coverage.xml
|
|
26
|
+
|
|
27
|
+
# Virtual environments
|
|
28
|
+
.venv
|
|
29
|
+
|
|
30
|
+
# Environment variables
|
|
31
|
+
.env*
|
|
32
|
+
.env.local
|
|
33
|
+
.env.secret
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# See https://pre-commit.com for more information
|
|
2
|
+
# See https://pre-commit.com/hooks.html for more hooks
|
|
3
|
+
repos:
|
|
4
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
5
|
+
rev: v6.0.0
|
|
6
|
+
hooks:
|
|
7
|
+
- id: trailing-whitespace
|
|
8
|
+
- id: end-of-file-fixer
|
|
9
|
+
- id: check-yaml
|
|
10
|
+
- id: check-added-large-files
|
|
11
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
12
|
+
rev: v0.15.4
|
|
13
|
+
hooks:
|
|
14
|
+
- id: ruff-check
|
|
15
|
+
args: [ --config=ruff.toml, --fix ]
|
|
16
|
+
- id: ruff-format
|
|
17
|
+
args: [ --config=ruff.toml ]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Contributing to AgentDbg
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in AgentDbg. This document covers dev setup, tests, lint/format, and how to add integrations.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Dev setup
|
|
8
|
+
|
|
9
|
+
1. **Clone and install with uv (recommended):**
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
git clone https://github.com/AgentDbg/AgentDbg.git
|
|
13
|
+
cd AgentDbg
|
|
14
|
+
uv venv && uv sync && uv pip install -e .
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
This creates a venv, installs dependencies (including dev), and installs the package in editable mode.
|
|
18
|
+
|
|
19
|
+
2. **Optional dependencies (e.g. LangChain integration):**
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
uv pip install -e ".[langchain]"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Running tests
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
uv run pytest
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Run a specific file or test:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
uv run pytest tests/test_tracing.py
|
|
37
|
+
uv run pytest tests/test_tracing.py -k "test_trace_creates_run"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Lint and format
|
|
43
|
+
|
|
44
|
+
- **Ruff** is used for linting and formatting. Dev dependencies include `ruff` and `pre-commit`.
|
|
45
|
+
- Format and lint:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
uv run ruff check .
|
|
49
|
+
uv run ruff format .
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
- **Pre-commit:** If you use pre-commit, install hooks with `uv run pre-commit install`. The project does not require pre-commit for contributions; running ruff before pushing is sufficient.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Adding integrations / adapters
|
|
57
|
+
|
|
58
|
+
AgentDbg is **framework-agnostic** at the core. Integrations are optional adapters that map framework callbacks to AgentDbg's recording API.
|
|
59
|
+
|
|
60
|
+
If you want to add or extend an integration (e.g. another framework):
|
|
61
|
+
|
|
62
|
+
1. **Optional dependencies only.** The integration must live under `agentdbg.integrations.*` and depend on the framework via optional extras (e.g. `[langchain]` in `pyproject.toml`). The core package must not depend on the framework.
|
|
63
|
+
2. **Keep the core framework-agnostic.** All recording goes through the public API: `record_llm_call`, `record_tool_call`, `record_state`. The integration's job is to translate framework events into those calls.
|
|
64
|
+
3. **Deterministic tests, no network.** Tests for the integration should be deterministic and not perform real LLM or network calls. Use mocks or in-memory stubs.
|
|
65
|
+
4. **Map callbacks to record_*.** Implement the framework's callback/hook interface and call the appropriate `record_*` functions so that events attach to the current run (or an implicit run if `AGENTDBG_IMPLICIT_RUN=1`).
|
|
66
|
+
|
|
67
|
+
New integrations should be documented in [docs/integrations.md](docs/integrations.md) with usage and install instructions.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Example folders
|
|
72
|
+
|
|
73
|
+
Examples live under `examples/` and must stay runnable from the repo root:
|
|
74
|
+
|
|
75
|
+
- **`examples/minimal/`** – minimal pure-Python agent (no extra deps); run `python examples/minimal/simple_agent.py`.
|
|
76
|
+
- **`examples/langchain/minimal.py`** – minimal LangChain chain; requires `[langchain]` extra.
|
|
77
|
+
- **`examples/langchain/`** – advanced LangChain/LangGraph customer-support demo (`customer_support.py` + `_customer_support/`); requires installing the `examples/langchain` dependencies and API keys (see `_customer_support/README.md`).
|
|
78
|
+
- **`examples/demo/`** – short demo scripts (`pure_python.py`, `langchain.py`).
|
|
79
|
+
|
|
80
|
+
When changing directory layout or run commands, update README, [docs/index.md](docs/index.md) (Demos section), and this list.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Documentation
|
|
85
|
+
|
|
86
|
+
- **User docs** live in `docs/`: [getting started](docs/getting-started.md), [CLI](docs/cli.md), [SDK](docs/sdk.md), [integrations](docs/integrations.md), [architecture](docs/architecture.md).
|
|
87
|
+
- **Reference docs** (public contracts) are in `docs/reference/`:
|
|
88
|
+
- [Trace format](docs/reference/trace-format.md) - event schema, run.json, payloads.
|
|
89
|
+
- [Configuration](docs/reference/config.md) - env vars, YAML precedence, redaction, loop detection.
|
|
90
|
+
|
|
91
|
+
When you change behavior that affects the trace format or configuration, update the relevant reference doc and any linked pages.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Summary
|
|
96
|
+
|
|
97
|
+
- **Setup:** `uv venv && uv sync && uv pip install -e .`
|
|
98
|
+
- **Tests:** `uv run pytest`
|
|
99
|
+
- **Lint/format:** `uv run ruff check .` and `uv run ruff format .`
|
|
100
|
+
- **Integrations:** Optional deps, map framework callbacks -> `record_*`, deterministic tests, document in `docs/integrations.md`.
|
agentdbg-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
Copyright 2026 AgentDbg Contributors
|
|
2
|
+
|
|
3
|
+
Apache License
|
|
4
|
+
Version 2.0, January 2004
|
|
5
|
+
http://www.apache.org/licenses/
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
12
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
13
|
+
|
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
15
|
+
the copyright owner that is granting the License.
|
|
16
|
+
|
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
18
|
+
other entities that control, are controlled by, or are under common
|
|
19
|
+
control with that entity. For the purposes of this definition,
|
|
20
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
21
|
+
direction or management of such entity, whether by contract or
|
|
22
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
23
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
24
|
+
|
|
25
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
26
|
+
exercising permissions granted by this License.
|
|
27
|
+
|
|
28
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
29
|
+
including but not limited to software source code, documentation
|
|
30
|
+
source, and configuration files.
|
|
31
|
+
|
|
32
|
+
"Object" form shall mean any form resulting from mechanical
|
|
33
|
+
transformation or translation of a Source form, including but
|
|
34
|
+
not limited to compiled object code, generated documentation,
|
|
35
|
+
and conversions to other media types.
|
|
36
|
+
|
|
37
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
38
|
+
Object form, made available under the License, as indicated by a
|
|
39
|
+
copyright notice that is included in or attached to the work
|
|
40
|
+
(an example is provided in the Appendix below).
|
|
41
|
+
|
|
42
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
43
|
+
form, that is based on (or derived from) the Work and for which the
|
|
44
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
45
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
46
|
+
of this License, Derivative Works shall not include works that remain
|
|
47
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
48
|
+
the Work and Derivative Works thereof.
|
|
49
|
+
|
|
50
|
+
"Contribution" shall mean any work of authorship, including
|
|
51
|
+
the original version of the Work and any modifications or additions
|
|
52
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
53
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
54
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
55
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
56
|
+
means any form of electronic, verbal, or written communication sent
|
|
57
|
+
to the Licensor or its representatives, including but not limited to
|
|
58
|
+
communication on electronic mailing lists, source code control systems,
|
|
59
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
60
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
61
|
+
excluding communication that is conspicuously marked or otherwise
|
|
62
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
63
|
+
|
|
64
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
65
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
66
|
+
subsequently incorporated within the Work.
|
|
67
|
+
|
|
68
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
69
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
70
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
71
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
72
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
73
|
+
Work and such Derivative Works in Source or Object form.
|
|
74
|
+
|
|
75
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
76
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
77
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
78
|
+
(except as stated in this section) patent license to make, have made,
|
|
79
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
80
|
+
where such license applies only to those patent claims licensable
|
|
81
|
+
by such Contributor that are necessarily infringed by their
|
|
82
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
83
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
84
|
+
institute patent litigation against any entity (including a
|
|
85
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
86
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
87
|
+
or contributory patent infringement, then any patent licenses
|
|
88
|
+
granted to You under this License for that Work shall terminate
|
|
89
|
+
as of the date such litigation is filed.
|
|
90
|
+
|
|
91
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
92
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
93
|
+
modifications, and in Source or Object form, provided that You
|
|
94
|
+
meet the following conditions:
|
|
95
|
+
|
|
96
|
+
(a) You must give any other recipients of the Work or
|
|
97
|
+
Derivative Works a copy of this License; and
|
|
98
|
+
|
|
99
|
+
(b) You must cause any modified files to carry prominent notices
|
|
100
|
+
stating that You changed the files; and
|
|
101
|
+
|
|
102
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
103
|
+
that You distribute, all copyright, patent, trademark, and
|
|
104
|
+
attribution notices from the Source form of the Work,
|
|
105
|
+
excluding those notices that do not pertain to any part of
|
|
106
|
+
the Derivative Works; and
|
|
107
|
+
|
|
108
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
109
|
+
distribution, then any Derivative Works that You distribute must
|
|
110
|
+
include a readable copy of the attribution notices contained
|
|
111
|
+
within such NOTICE file, excluding those notices that do not
|
|
112
|
+
pertain to any part of the Derivative Works, in at least one
|
|
113
|
+
of the following places: within a NOTICE text file distributed
|
|
114
|
+
as part of the Derivative Works; within the Source form or
|
|
115
|
+
documentation, if provided along with the Derivative Works; or,
|
|
116
|
+
within a display generated by the Derivative Works, if and
|
|
117
|
+
wherever such third-party notices normally appear. The contents
|
|
118
|
+
of the NOTICE file are for informational purposes only and
|
|
119
|
+
do not modify the License. You may add Your own attribution
|
|
120
|
+
notices within Derivative Works that You distribute, alongside
|
|
121
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
122
|
+
that such additional attribution notices cannot be construed
|
|
123
|
+
as modifying the License.
|
|
124
|
+
|
|
125
|
+
You may add Your own copyright statement to Your modifications and
|
|
126
|
+
may provide additional or different license terms and conditions
|
|
127
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
128
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
129
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
130
|
+
the conditions stated in this License.
|
|
131
|
+
|
|
132
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
133
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
134
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
135
|
+
this License, without any additional terms or conditions.
|
|
136
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
137
|
+
the terms of any separate license agreement you may have executed
|
|
138
|
+
with Licensor regarding such Contributions.
|
|
139
|
+
|
|
140
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
141
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
142
|
+
except as required for reasonable and customary use in describing the
|
|
143
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
144
|
+
|
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
149
|
+
implied, including, without limitation, any warranties or conditions
|
|
150
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
151
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
|
153
|
+
risks associated with Your exercise of permissions under this License.
|
|
154
|
+
|
|
155
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
156
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
157
|
+
unless required by applicable law (such as deliberate and grossly
|
|
158
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
159
|
+
liable to You for damages, including any direct, indirect, special,
|
|
160
|
+
incidental, or consequential damages of any character arising as a
|
|
161
|
+
result of this License or out of the use or inability to use the
|
|
162
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
163
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
164
|
+
other commercial damages or losses), even if such Contributor
|
|
165
|
+
has been advised of the possibility of such damages.
|
|
166
|
+
|
|
167
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
168
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
169
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
170
|
+
or other liability obligations and/or rights consistent with this
|
|
171
|
+
License. However, in accepting such obligations, You may act only
|
|
172
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
173
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
174
|
+
defend, and hold each Contributor harmless for any liability
|
|
175
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
176
|
+
of your accepting any such warranty or additional liability.
|
|
177
|
+
|
|
178
|
+
END OF TERMS AND CONDITIONS
|
|
179
|
+
|
|
180
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
181
|
+
|
|
182
|
+
To apply the Apache License to your work, attach the following
|
|
183
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
184
|
+
replaced with your own identifying information. (Don't include
|
|
185
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
186
|
+
comment syntax for the file format. We also recommend that a
|
|
187
|
+
file or class name and description of purpose be included on the
|
|
188
|
+
same "printed page" as the copyright notice for easier
|
|
189
|
+
identification within third-party archives.
|