flowtraicer 0.9.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.
- flowtraicer-0.9.0/.github/workflows/ci.yml +49 -0
- flowtraicer-0.9.0/.github/workflows/publish.yml +77 -0
- flowtraicer-0.9.0/.gitignore +26 -0
- flowtraicer-0.9.0/CHANGELOG.md +64 -0
- flowtraicer-0.9.0/CODE_OF_CONDUCT.md +41 -0
- flowtraicer-0.9.0/CONTRIBUTING.md +71 -0
- flowtraicer-0.9.0/LICENSE +201 -0
- flowtraicer-0.9.0/PKG-INFO +467 -0
- flowtraicer-0.9.0/README.md +413 -0
- flowtraicer-0.9.0/docs/2026-06-23-xai-walking-skeleton-design.md +171 -0
- flowtraicer-0.9.0/pyproject.toml +79 -0
- flowtraicer-0.9.0/src/ft/__init__.py +3 -0
- flowtraicer-0.9.0/src/ft/analytics.py +112 -0
- flowtraicer-0.9.0/src/ft/audit.py +31 -0
- flowtraicer-0.9.0/src/ft/core/__init__.py +1 -0
- flowtraicer-0.9.0/src/ft/core/model.py +178 -0
- flowtraicer-0.9.0/src/ft/examples/__init__.py +1 -0
- flowtraicer-0.9.0/src/ft/examples/demo_agent.py +126 -0
- flowtraicer-0.9.0/src/ft/extraction.py +126 -0
- flowtraicer-0.9.0/src/ft/langgraph_adapter/__init__.py +7 -0
- flowtraicer-0.9.0/src/ft/langgraph_adapter/runner.py +154 -0
- flowtraicer-0.9.0/src/ft/langgraph_adapter/state.py +36 -0
- flowtraicer-0.9.0/src/ft/langgraph_adapter/topology.py +42 -0
- flowtraicer-0.9.0/src/ft/llm.py +168 -0
- flowtraicer-0.9.0/src/ft/orchestration.py +235 -0
- flowtraicer-0.9.0/src/ft/py.typed +0 -0
- flowtraicer-0.9.0/src/ft/recorder.py +197 -0
- flowtraicer-0.9.0/src/ft/registry.py +150 -0
- flowtraicer-0.9.0/src/ft/retention.py +33 -0
- flowtraicer-0.9.0/src/ft/server/__init__.py +1 -0
- flowtraicer-0.9.0/src/ft/server/app.py +96 -0
- flowtraicer-0.9.0/src/ft/server/static/app.js +228 -0
- flowtraicer-0.9.0/src/ft/server/static/index.html +50 -0
- flowtraicer-0.9.0/src/ft/server/static/style.css +140 -0
- flowtraicer-0.9.0/src/ft/store/__init__.py +1 -0
- flowtraicer-0.9.0/src/ft/store/base.py +76 -0
- flowtraicer-0.9.0/src/ft/store/postgres.py +117 -0
- flowtraicer-0.9.0/src/ft/store/reconstruct.py +74 -0
- flowtraicer-0.9.0/src/ft/store/records.py +109 -0
- flowtraicer-0.9.0/src/ft/store/redis.py +121 -0
- flowtraicer-0.9.0/src/ft/store/sqlite.py +113 -0
- flowtraicer-0.9.0/src/ft/timeline.py +111 -0
- flowtraicer-0.9.0/tests/test_adapter.py +121 -0
- flowtraicer-0.9.0/tests/test_analytics.py +103 -0
- flowtraicer-0.9.0/tests/test_audit.py +37 -0
- flowtraicer-0.9.0/tests/test_demo_integration.py +42 -0
- flowtraicer-0.9.0/tests/test_extraction.py +114 -0
- flowtraicer-0.9.0/tests/test_llm.py +156 -0
- flowtraicer-0.9.0/tests/test_model.py +89 -0
- flowtraicer-0.9.0/tests/test_model_tokens.py +77 -0
- flowtraicer-0.9.0/tests/test_orchestration.py +156 -0
- flowtraicer-0.9.0/tests/test_recorder.py +61 -0
- flowtraicer-0.9.0/tests/test_registry.py +169 -0
- flowtraicer-0.9.0/tests/test_retention.py +72 -0
- flowtraicer-0.9.0/tests/test_server.py +91 -0
- flowtraicer-0.9.0/tests/test_store.py +142 -0
- flowtraicer-0.9.0/tests/test_store_postgres.py +111 -0
- flowtraicer-0.9.0/tests/test_store_redis.py +92 -0
- flowtraicer-0.9.0/tests/test_timeline.py +110 -0
- flowtraicer-0.9.0/tests/test_timeline_tokens.py +33 -0
- flowtraicer-0.9.0/tests/test_tokens_flow.py +121 -0
- flowtraicer-0.9.0/tests/test_trace_state.py +51 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
15
|
+
|
|
16
|
+
services:
|
|
17
|
+
postgres:
|
|
18
|
+
image: postgres:16-alpine
|
|
19
|
+
env:
|
|
20
|
+
POSTGRES_PASSWORD: xai
|
|
21
|
+
POSTGRES_DB: xai
|
|
22
|
+
ports:
|
|
23
|
+
- 5432:5432
|
|
24
|
+
options: >-
|
|
25
|
+
--health-cmd "pg_isready -U postgres"
|
|
26
|
+
--health-interval 10s
|
|
27
|
+
--health-timeout 5s
|
|
28
|
+
--health-retries 5
|
|
29
|
+
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
|
|
33
|
+
- uses: actions/setup-python@v5
|
|
34
|
+
with:
|
|
35
|
+
python-version: ${{ matrix.python-version }}
|
|
36
|
+
cache: pip
|
|
37
|
+
|
|
38
|
+
- name: Install
|
|
39
|
+
run: pip install -e ".[dev,postgres,extraction,litellm]"
|
|
40
|
+
|
|
41
|
+
- name: Lint
|
|
42
|
+
run: |
|
|
43
|
+
ruff check .
|
|
44
|
+
ruff format --check .
|
|
45
|
+
|
|
46
|
+
- name: Test (incl. Postgres backend)
|
|
47
|
+
env:
|
|
48
|
+
FT_TEST_PG_DSN: postgresql://postgres:xai@127.0.0.1:5432/xai
|
|
49
|
+
run: pytest
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
# Publishes flowtraicer to PyPI when a GitHub Release is published.
|
|
4
|
+
# Uses PyPI Trusted Publishing (OIDC) — no API token/secret is stored in the repo.
|
|
5
|
+
#
|
|
6
|
+
# One-time setup on PyPI (https://pypi.org/manage/account/publishing/):
|
|
7
|
+
# Add a "pending publisher" for project `flowtraicer` with:
|
|
8
|
+
# Owner: AlirezaShk Repository: flowtraicer
|
|
9
|
+
# Workflow name: publish.yml Environment: pypi
|
|
10
|
+
# After the first successful publish, the project's trusted publisher is permanent.
|
|
11
|
+
#
|
|
12
|
+
# Release flow: bump `version` in pyproject.toml -> tag (e.g. v0.0.1) ->
|
|
13
|
+
# create a GitHub Release for that tag. This workflow then builds & publishes.
|
|
14
|
+
|
|
15
|
+
on:
|
|
16
|
+
release:
|
|
17
|
+
types: [published]
|
|
18
|
+
workflow_dispatch: # allow a manual run (build artifacts; publish still gated by environment)
|
|
19
|
+
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
build:
|
|
25
|
+
name: Build & test distributions
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
|
|
30
|
+
- uses: actions/setup-python@v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: "3.12"
|
|
33
|
+
cache: pip
|
|
34
|
+
|
|
35
|
+
- name: Install (with test extras)
|
|
36
|
+
run: pip install -e ".[dev,extraction,litellm]"
|
|
37
|
+
|
|
38
|
+
- name: Sanity — lint, import, test
|
|
39
|
+
run: |
|
|
40
|
+
ruff check .
|
|
41
|
+
python -c "import ft; from ft.registry import REGISTER; from ft.llm import LLMClient; print('ft import OK')"
|
|
42
|
+
pytest -q
|
|
43
|
+
|
|
44
|
+
- name: Build sdist + wheel
|
|
45
|
+
run: |
|
|
46
|
+
python -m pip install --upgrade build
|
|
47
|
+
python -m build
|
|
48
|
+
|
|
49
|
+
- name: Check metadata renders on PyPI
|
|
50
|
+
run: |
|
|
51
|
+
python -m pip install --upgrade twine
|
|
52
|
+
twine check dist/*
|
|
53
|
+
|
|
54
|
+
- uses: actions/upload-artifact@v4
|
|
55
|
+
with:
|
|
56
|
+
name: dist
|
|
57
|
+
path: dist/
|
|
58
|
+
|
|
59
|
+
publish:
|
|
60
|
+
name: Publish to PyPI
|
|
61
|
+
needs: build
|
|
62
|
+
runs-on: ubuntu-latest
|
|
63
|
+
# Only publish for an actual release event (not manual builds).
|
|
64
|
+
if: github.event_name == 'release'
|
|
65
|
+
environment:
|
|
66
|
+
name: pypi
|
|
67
|
+
url: https://pypi.org/p/flowtraicer
|
|
68
|
+
permissions:
|
|
69
|
+
id-token: write # OIDC token for Trusted Publishing
|
|
70
|
+
steps:
|
|
71
|
+
- uses: actions/download-artifact@v4
|
|
72
|
+
with:
|
|
73
|
+
name: dist
|
|
74
|
+
path: dist/
|
|
75
|
+
|
|
76
|
+
- name: Publish to PyPI (Trusted Publishing)
|
|
77
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.eggs/
|
|
6
|
+
build/
|
|
7
|
+
dist/
|
|
8
|
+
.venv/
|
|
9
|
+
venv/
|
|
10
|
+
|
|
11
|
+
# Test / tooling
|
|
12
|
+
.pytest_cache/
|
|
13
|
+
.ruff_cache/
|
|
14
|
+
.coverage
|
|
15
|
+
htmlcov/
|
|
16
|
+
|
|
17
|
+
# Trace stores / local data
|
|
18
|
+
*.sqlite
|
|
19
|
+
*.sqlite3
|
|
20
|
+
*.db
|
|
21
|
+
data/
|
|
22
|
+
|
|
23
|
+
# OS / editor
|
|
24
|
+
.DS_Store
|
|
25
|
+
.idea/
|
|
26
|
+
.vscode/
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format is based on
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project aims to follow
|
|
5
|
+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html) once it reaches a public release.
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.9.0] - 2026-06-24
|
|
10
|
+
|
|
11
|
+
First public release. FlowTraicer maps, visualizes, monitors, debugs, logs, and audits the
|
|
12
|
+
steps of an engagement between a user and an agentic AI system.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
**Trace core**
|
|
17
|
+
- `Engagement → Step → Event` model with per-step tools, per-step extraction, global-step
|
|
18
|
+
intent switches, and per-step / per-engagement token totals.
|
|
19
|
+
- `TraceState` base graph-state declaring the conventional channels (`tool_calls`, `llm_calls`,
|
|
20
|
+
`events`, `extraction`) so nodes never redeclare them.
|
|
21
|
+
|
|
22
|
+
**Storage**
|
|
23
|
+
- Pluggable append-only `Store` with SQLite (default, zero-dependency), Redis Streams, and
|
|
24
|
+
Postgres (JSONB + `LISTEN/NOTIFY`) backends, plus live `subscribe` on all three.
|
|
25
|
+
|
|
26
|
+
**LangGraph integration**
|
|
27
|
+
- Auto-instrumentation: `run_instrumented` records node entry/exit, timing, tools, LLM calls,
|
|
28
|
+
extractions, and intent switches; `read_topology` reflects the compiled graph.
|
|
29
|
+
- Drop-off tracking: `goal_nodes` mark journeys that never reached a goal as `ABANDONED` with
|
|
30
|
+
`dropped_at` set to the last step reached.
|
|
31
|
+
|
|
32
|
+
**Workflow orchestration**
|
|
33
|
+
- `Workflow` DSL over LangGraph (declare steps, tools, global steps, goals, edges) with an
|
|
34
|
+
injected per-step context (`ctx.llm`) that records token usage automatically.
|
|
35
|
+
- **Build once, run many:** a `Workflow` compiles its graph once (cached); per-run dependencies
|
|
36
|
+
pass through `run(..., llm=…, deps=…)` and surface to nodes via `ctx.llm` / `ctx.deps`
|
|
37
|
+
(LangGraph `configurable` DI). Nodes no longer close over request state, so one workflow
|
|
38
|
+
instance serves every request without rebuilding/recompiling the graph.
|
|
39
|
+
|
|
40
|
+
**LLM integration (provider-agnostic)**
|
|
41
|
+
- `ft.llm.LLMClient` protocol (one async `acomplete` method) is the only contract `ctx.llm`
|
|
42
|
+
requires, so any provider/SDK can be plugged in. `LiteLLMClient` is the bundled, config-driven
|
|
43
|
+
implementation (one config → 100+ providers). See the README's "bring your own provider".
|
|
44
|
+
- Instructor-powered per-step schema extraction (`ft.extraction`).
|
|
45
|
+
- Global LLM-provider registry: `ft.registry.REGISTER.set_llm_provider(client)` sets one default
|
|
46
|
+
provider every workflow falls back to (resolution order: per-run `llm=` > `Workflow(llm=)` >
|
|
47
|
+
registry). Validates the client satisfies `LLMClient` and raises a descriptive `TypeError`
|
|
48
|
+
otherwise.
|
|
49
|
+
- Global recorder for out-of-workflow LLM calls: `REGISTER.set_recorder(recorder)` +
|
|
50
|
+
`REGISTER.record_llm_usage(model, tokens=…, caller=…, metadata=…)` record token usage from
|
|
51
|
+
agent/LLM calls made outside a `Workflow` (chat, voice, extraction). Each becomes a small
|
|
52
|
+
self-contained engagement so it rolls up by model/caller. Fail-open; validated on registration.
|
|
53
|
+
|
|
54
|
+
**Analytics, retention & audit**
|
|
55
|
+
- Cross-engagement analytics: `funnel`, `journeys`, `group_by`.
|
|
56
|
+
- Retention: `purge` / `RetentionPolicy` (completed engagements past their window; active ones
|
|
57
|
+
never purged).
|
|
58
|
+
- Tamper-evident audit digests (`ft.audit`): fingerprint an engagement and later detect any
|
|
59
|
+
alteration.
|
|
60
|
+
|
|
61
|
+
**Viewer**
|
|
62
|
+
- FastAPI query + live-stream server and a linked Cytoscape.js **graph + timeline** viewer.
|
|
63
|
+
|
|
64
|
+
> Pre-1.0: the public API may still change between minor versions.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a
|
|
6
|
+
harassment-free experience for everyone, regardless of age, body size, visible or invisible
|
|
7
|
+
disability, ethnicity, sex characteristics, gender identity and expression, level of
|
|
8
|
+
experience, education, socio-economic status, nationality, personal appearance, race,
|
|
9
|
+
religion, or sexual identity and orientation.
|
|
10
|
+
|
|
11
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse,
|
|
12
|
+
inclusive, and healthy community.
|
|
13
|
+
|
|
14
|
+
## Our Standards
|
|
15
|
+
|
|
16
|
+
Examples of behavior that contributes to a positive environment:
|
|
17
|
+
|
|
18
|
+
- Demonstrating empathy and kindness toward other people
|
|
19
|
+
- Being respectful of differing opinions, viewpoints, and experiences
|
|
20
|
+
- Giving and gracefully accepting constructive feedback
|
|
21
|
+
- Accepting responsibility and apologizing to those affected by our mistakes
|
|
22
|
+
- Focusing on what is best for the overall community
|
|
23
|
+
|
|
24
|
+
Examples of unacceptable behavior:
|
|
25
|
+
|
|
26
|
+
- The use of sexualized language or imagery, and sexual attention or advances of any kind
|
|
27
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
28
|
+
- Public or private harassment
|
|
29
|
+
- Publishing others' private information without their explicit permission
|
|
30
|
+
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
31
|
+
|
|
32
|
+
## Enforcement
|
|
33
|
+
|
|
34
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the
|
|
35
|
+
project maintainers. All complaints will be reviewed and investigated promptly and fairly.
|
|
36
|
+
Maintainers are obligated to respect the privacy and security of the reporter of any incident.
|
|
37
|
+
|
|
38
|
+
## Attribution
|
|
39
|
+
|
|
40
|
+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
|
|
41
|
+
version 2.1.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Contributing to FlowTraicer
|
|
2
|
+
|
|
3
|
+
Thanks for your interest! `FlowTraicer` is a small, focused library — contributions that keep it
|
|
4
|
+
that way (clear boundaries, tested, documented) are very welcome.
|
|
5
|
+
|
|
6
|
+
> **Note:** `FlowTraicer` is a working name and will be renamed before the first public release. The
|
|
7
|
+
> package imports as `FlowTraicer` today; if you reference it, expect a rename.
|
|
8
|
+
|
|
9
|
+
## Development setup
|
|
10
|
+
|
|
11
|
+
Requires Python ≥ 3.11.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
python -m venv .venv && source .venv/bin/activate
|
|
15
|
+
pip install -e ".[dev]" # core + test/lint deps (includes fakeredis)
|
|
16
|
+
# optional, depending on what you touch:
|
|
17
|
+
pip install -e ".[extraction]" # Instructor extraction
|
|
18
|
+
pip install -e ".[litellm]" # the LiteLLM client helper
|
|
19
|
+
pip install -e ".[postgres]" # the Postgres store backend
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Tests
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pytest # the full suite
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- The **SQLite** and **Redis** store tests run offline (Redis via `fakeredis`).
|
|
29
|
+
- The **Postgres** store tests are skipped unless `FT_TEST_PG_DSN` is set:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
docker run -d --name FlowTraicer-pg -e POSTGRES_PASSWORD=FlowTraicer -e POSTGRES_DB=FlowTraicer \
|
|
33
|
+
-p 5432:5432 postgres:16-alpine
|
|
34
|
+
FT_TEST_PG_DSN="postgresql://postgres:FlowTraicer@127.0.0.1:5432/FlowTraicer" pytest
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- No test needs a network or an API key — LLM/provider calls are injected/stubbed.
|
|
38
|
+
|
|
39
|
+
We use **TDD**: write a failing test first, then the minimal code to pass it. Every new
|
|
40
|
+
function/method gets a test; behaviour changes get a test that fails before your change.
|
|
41
|
+
|
|
42
|
+
## Lint & format
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
ruff check .
|
|
46
|
+
ruff format .
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
CI runs `ruff check`, `ruff format --check`, and `pytest` (with a Postgres service) on every
|
|
50
|
+
push and PR. Keep the build green.
|
|
51
|
+
|
|
52
|
+
## Design principles
|
|
53
|
+
|
|
54
|
+
- **The trace core is framework-agnostic.** Only `ft.langgraph_adapter` knows about
|
|
55
|
+
LangGraph; other engines should be added as adapters that call the recorder's emit API.
|
|
56
|
+
- **Instrumentation is fail-open** — recording must never crash the observed agent.
|
|
57
|
+
- **Small, well-bounded units** with clear interfaces. If a file is doing too much, split it.
|
|
58
|
+
- Prefer relative imports inside the package (the name is provisional).
|
|
59
|
+
|
|
60
|
+
See the [README](README.md) architecture table and `docs/` for the bigger picture.
|
|
61
|
+
|
|
62
|
+
## Commits & PRs
|
|
63
|
+
|
|
64
|
+
- Conventional-style messages help (`feat:`, `fix:`, `docs:`, `refactor:`, `test:`).
|
|
65
|
+
- One logical change per PR; include tests and doc updates with the code.
|
|
66
|
+
- By contributing, you agree your contributions are licensed under the project's
|
|
67
|
+
[Apache-2.0 License](LICENSE).
|
|
68
|
+
|
|
69
|
+
## Code of conduct
|
|
70
|
+
|
|
71
|
+
This project follows the [Contributor Covenant](CODE_OF_CONDUCT.md). Be kind.
|
|
@@ -0,0 +1,201 @@
|
|
|
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, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
95
|
+
Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and do
|
|
117
|
+
not modify the License. You may add Your own attribution notices
|
|
118
|
+
within Derivative Works that You distribute, alongside or as an
|
|
119
|
+
addendum to the NOTICE text from the Work, provided that such
|
|
120
|
+
additional attribution notices cannot be construed as modifying
|
|
121
|
+
the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|