agenthandler 0.92.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.

Potentially problematic release.


This version of agenthandler might be problematic. Click here for more details.

Files changed (99) hide show
  1. agenthandler-0.92.0/.github/ISSUE_TEMPLATE/bug_report.md +19 -0
  2. agenthandler-0.92.0/.github/ISSUE_TEMPLATE/feature_request.md +11 -0
  3. agenthandler-0.92.0/.github/workflows/ci.yml +41 -0
  4. agenthandler-0.92.0/.github/workflows/claude-pr-review.yml +28 -0
  5. agenthandler-0.92.0/.gitignore +43 -0
  6. agenthandler-0.92.0/CHANGELOG.md +136 -0
  7. agenthandler-0.92.0/CONTRIBUTING.md +64 -0
  8. agenthandler-0.92.0/LICENSE +201 -0
  9. agenthandler-0.92.0/PKG-INFO +1355 -0
  10. agenthandler-0.92.0/README.md +1312 -0
  11. agenthandler-0.92.0/agenthandler/__init__.py +163 -0
  12. agenthandler-0.92.0/agenthandler/approval.py +135 -0
  13. agenthandler-0.92.0/agenthandler/audit.py +144 -0
  14. agenthandler-0.92.0/agenthandler/auth.py +188 -0
  15. agenthandler-0.92.0/agenthandler/budget.py +94 -0
  16. agenthandler-0.92.0/agenthandler/builder.py +178 -0
  17. agenthandler-0.92.0/agenthandler/circuit_breaker.py +88 -0
  18. agenthandler-0.92.0/agenthandler/connectors.py +425 -0
  19. agenthandler-0.92.0/agenthandler/context.py +410 -0
  20. agenthandler-0.92.0/agenthandler/errors.py +130 -0
  21. agenthandler-0.92.0/agenthandler/guardrails/__init__.py +79 -0
  22. agenthandler-0.92.0/agenthandler/guardrails/deterministic.py +472 -0
  23. agenthandler-0.92.0/agenthandler/guardrails/llm_based.py +549 -0
  24. agenthandler-0.92.0/agenthandler/guardrails/types.py +83 -0
  25. agenthandler-0.92.0/agenthandler/observe.py +525 -0
  26. agenthandler-0.92.0/agenthandler/openclaw.py +370 -0
  27. agenthandler-0.92.0/agenthandler/pipeline.py +532 -0
  28. agenthandler-0.92.0/agenthandler/pipeline_poml.py +593 -0
  29. agenthandler-0.92.0/agenthandler/policy.py +251 -0
  30. agenthandler-0.92.0/agenthandler/py.typed +0 -0
  31. agenthandler-0.92.0/agenthandler/redact.py +260 -0
  32. agenthandler-0.92.0/agenthandler/reflection.py +371 -0
  33. agenthandler-0.92.0/agenthandler/replay.py +225 -0
  34. agenthandler-0.92.0/agenthandler/server.py +752 -0
  35. agenthandler-0.92.0/agenthandler/session.py +391 -0
  36. agenthandler-0.92.0/agenthandler/skill.py +265 -0
  37. agenthandler-0.92.0/agenthandler/store.py +341 -0
  38. agenthandler-0.92.0/agenthandler/streams.py +339 -0
  39. agenthandler-0.92.0/agenthandler/supervisor.py +882 -0
  40. agenthandler-0.92.0/agenthandler/triggers.py +471 -0
  41. agenthandler-0.92.0/dashboard.html +4012 -0
  42. agenthandler-0.92.0/docs/architecture.svg +84 -0
  43. agenthandler-0.92.0/docs/manifesto.md +109 -0
  44. agenthandler-0.92.0/docs/superpowers/plans/2026-06-09-hardening-pass.md +1138 -0
  45. agenthandler-0.92.0/docs/superpowers/specs/2026-06-09-hardening-pass-design.md +91 -0
  46. agenthandler-0.92.0/examples/approval_flow.py +71 -0
  47. agenthandler-0.92.0/examples/audit_logging.py +34 -0
  48. agenthandler-0.92.0/examples/basic.py +51 -0
  49. agenthandler-0.92.0/examples/circuit_breaker.py +47 -0
  50. agenthandler-0.92.0/examples/context_compression.py +104 -0
  51. agenthandler-0.92.0/examples/cost_attribution.py +115 -0
  52. agenthandler-0.92.0/examples/data_flows.py +158 -0
  53. agenthandler-0.92.0/examples/from_config.py +46 -0
  54. agenthandler-0.92.0/examples/guardrails.py +139 -0
  55. agenthandler-0.92.0/examples/long_running_agent.py +254 -0
  56. agenthandler-0.92.0/examples/openclaw_bridge.py +120 -0
  57. agenthandler-0.92.0/examples/pii_redaction.py +60 -0
  58. agenthandler-0.92.0/examples/pipeline.py +75 -0
  59. agenthandler-0.92.0/examples/poml_pipeline.py +135 -0
  60. agenthandler-0.92.0/examples/session_lifecycle.py +119 -0
  61. agenthandler-0.92.0/examples/skill_builder.py +126 -0
  62. agenthandler-0.92.0/examples/streaming.py +80 -0
  63. agenthandler-0.92.0/examples/tool_scoping.py +80 -0
  64. agenthandler-0.92.0/examples/triggers.py +107 -0
  65. agenthandler-0.92.0/npm/README.md +21 -0
  66. agenthandler-0.92.0/npm/bin/agenthandler.js +15 -0
  67. agenthandler-0.92.0/npm/package.json +31 -0
  68. agenthandler-0.92.0/openclaw-plugin/openclaw.plugin.json +30 -0
  69. agenthandler-0.92.0/openclaw-plugin/package.json +22 -0
  70. agenthandler-0.92.0/openclaw-plugin/src/index.ts +120 -0
  71. agenthandler-0.92.0/openclaw-plugin/tsconfig.json +12 -0
  72. agenthandler-0.92.0/pyproject.toml +83 -0
  73. agenthandler-0.92.0/tests/__init__.py +0 -0
  74. agenthandler-0.92.0/tests/test_approval.py +263 -0
  75. agenthandler-0.92.0/tests/test_audit.py +277 -0
  76. agenthandler-0.92.0/tests/test_budget.py +240 -0
  77. agenthandler-0.92.0/tests/test_circuit_breaker.py +136 -0
  78. agenthandler-0.92.0/tests/test_connectors.py +225 -0
  79. agenthandler-0.92.0/tests/test_context.py +601 -0
  80. agenthandler-0.92.0/tests/test_cost_attribution.py +272 -0
  81. agenthandler-0.92.0/tests/test_errors.py +126 -0
  82. agenthandler-0.92.0/tests/test_guardrails.py +617 -0
  83. agenthandler-0.92.0/tests/test_llm_decisions.py +294 -0
  84. agenthandler-0.92.0/tests/test_observe.py +129 -0
  85. agenthandler-0.92.0/tests/test_openclaw.py +423 -0
  86. agenthandler-0.92.0/tests/test_pipeline.py +482 -0
  87. agenthandler-0.92.0/tests/test_pipeline_poml.py +593 -0
  88. agenthandler-0.92.0/tests/test_policy.py +161 -0
  89. agenthandler-0.92.0/tests/test_redact.py +186 -0
  90. agenthandler-0.92.0/tests/test_replay_reflection.py +375 -0
  91. agenthandler-0.92.0/tests/test_schema_discovery.py +191 -0
  92. agenthandler-0.92.0/tests/test_scopes.py +723 -0
  93. agenthandler-0.92.0/tests/test_server.py +333 -0
  94. agenthandler-0.92.0/tests/test_session.py +561 -0
  95. agenthandler-0.92.0/tests/test_skill.py +355 -0
  96. agenthandler-0.92.0/tests/test_store.py +271 -0
  97. agenthandler-0.92.0/tests/test_streams.py +192 -0
  98. agenthandler-0.92.0/tests/test_supervisor.py +308 -0
  99. agenthandler-0.92.0/tests/test_triggers.py +251 -0
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: Bug report
3
+ about: Something isn't working as expected
4
+ labels: bug
5
+ ---
6
+
7
+ **What happened?**
8
+
9
+ **What did you expect?**
10
+
11
+ **Minimal reproduction**
12
+ ```python
13
+ # paste code here
14
+ ```
15
+
16
+ **Environment**
17
+ - Python version:
18
+ - agenthandler version:
19
+ - OS:
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest a new feature or improvement
4
+ labels: enhancement
5
+ ---
6
+
7
+ **What problem does this solve?**
8
+
9
+ **What does the solution look like?**
10
+
11
+ **Alternatives considered**
@@ -0,0 +1,41 @@
1
+ name: CI
2
+ on:
3
+ push:
4
+ branches: [main]
5
+ pull_request:
6
+ branches: [main]
7
+
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: actions/setup-python@v5
17
+ with:
18
+ python-version: ${{ matrix.python-version }}
19
+ - run: pip install -e ".[dev,server]"
20
+ - run: pytest tests/ -v --tb=short
21
+
22
+ lint:
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+ - uses: actions/setup-python@v5
27
+ with:
28
+ python-version: "3.12"
29
+ - run: pip install ruff
30
+ - run: ruff check .
31
+ - run: ruff format --check .
32
+
33
+ typecheck:
34
+ runs-on: ubuntu-latest
35
+ steps:
36
+ - uses: actions/checkout@v4
37
+ - uses: actions/setup-python@v5
38
+ with:
39
+ python-version: "3.12"
40
+ - run: pip install -e ".[dev,server]"
41
+ - run: mypy agenthandler/
@@ -0,0 +1,28 @@
1
+ name: Claude PR Review
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize, reopened]
6
+ issue_comment:
7
+ types: [created]
8
+
9
+ jobs:
10
+ claude-review:
11
+ if: |
12
+ (github.event_name == 'pull_request') ||
13
+ (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude'))
14
+ runs-on: ubuntu-latest
15
+ permissions:
16
+ contents: read
17
+ pull-requests: write
18
+ issues: write
19
+ steps:
20
+ - name: Checkout repository
21
+ uses: actions/checkout@v4
22
+ with:
23
+ fetch-depth: 1
24
+
25
+ - name: Run Claude PR Review
26
+ uses: anthropics/claude-code-action@v1
27
+ with:
28
+ anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
@@ -0,0 +1,43 @@
1
+ # Python
2
+ __pycache__/
3
+ *.pyc
4
+ *.pyo
5
+ *.egg-info/
6
+ dist/
7
+ build/
8
+ .eggs/
9
+ *.egg
10
+ .venv/
11
+ venv/
12
+
13
+ # Testing
14
+ .pytest_cache/
15
+ .coverage
16
+ htmlcov/
17
+ .mypy_cache/
18
+
19
+ # IDE
20
+ .idea/
21
+ .vscode/
22
+ *.swp
23
+ *.swo
24
+ .DS_Store
25
+
26
+ # Node (for openclaw-plugin)
27
+ node_modules/
28
+ openclaw-plugin/dist/
29
+
30
+ # Stray installers / large binaries
31
+ npm/*.sh
32
+ *.pkg
33
+ *.dmg
34
+
35
+ # Environment
36
+ .env
37
+ .env.*
38
+
39
+ # Internal docs (not for public repos)
40
+ ROADMAP.internal.md
41
+
42
+ # SQLite databases (created by clawboss sessions)
43
+ *.db
@@ -0,0 +1,136 @@
1
+ # Changelog
2
+
3
+ All notable changes to AgentHandler are documented here.
4
+
5
+ ## [0.92.0] — 2026-07-11
6
+
7
+ ### Added
8
+ - **Dashboard**: Live agent chat with full supervision, LLM-powered agent builder, visual pipeline editor with drag-to-reorder, budget overrides per agent, localStorage persistence.
9
+ - **POML security hardening**: Replaced unsafe `eval()` in condition expressions with an AST-based whitelist evaluator. Function calls, attribute access, comprehensions, lambdas, and imports are rejected at parse time.
10
+ - **PipelineBuilder validation**: `create_poml()` and `refine()` now validate that LLM output contains a parseable `<pipeline>` block before returning.
11
+ - 28 new POML tests (expression safety, parse error edge cases, builder validation).
12
+ - Test count badge in README.
13
+
14
+ ### Changed
15
+ - **mypy --strict** enabled across all 29 source files with zero errors. Full type annotations on every function.
16
+ - Python 3.13 compatibility: replaced deprecated `asyncio.get_event_loop()` in approval tests.
17
+
18
+ ## [0.91.0] — 2026-06-10
19
+
20
+ ### Added
21
+ - **Cost attribution**: `PricingTable` with built-in model pricing (Claude Opus/Sonnet/Haiku, GPT-4o family, Gemini Pro/Flash).
22
+ - `Observer` extended with `input_tokens`, `output_tokens`, `cost_usd`, and `model` per call.
23
+ - `cost_summary()` with breakdowns by agent, session, tool, and model.
24
+ - REST endpoints: `GET /metrics/costs`, `GET /metrics/pricing`.
25
+ - Dashboard Costs tab wired to live data from the API.
26
+ - `SessionManager` defaults to `PricingTable.default()` — cost attribution works out of the box.
27
+ - 22 new tests (630 total).
28
+
29
+ ## [0.90.0] — 2026-06-09
30
+
31
+ ### Added
32
+ - **Session replay**: `SessionReplay` reconstructs agent timelines from audit logs. `frames()`, `state_at()`, `filter()`, `summary()`, `to_timeline()`. REST endpoint: `GET /sessions/{id}/replay`.
33
+ - **Reflection loops**: Structured think → act → observe → reflect cycles via `ReflectionLoop`. Each phase is a separate LLM call, fully supervised and audited.
34
+ - **Long-duration agent manifesto** (`docs/manifesto.md`).
35
+ - Example: `examples/long_running_agent.py`.
36
+
37
+ ## [0.89.0] — 2026-06-08
38
+
39
+ ### Added
40
+ - **16 guardrails** — 8 deterministic + 8 LLM-backed:
41
+ - Deterministic: `SchemaValidator`, `CategoryRateLimit`, `RecursionDetector`, `IdempotencyGuard`, `ResourceQuota`, `OutputLengthLimit`, `UrlGuard`, `ActiveHours`.
42
+ - LLM-backed: `PromptInjectionDetector`, `SafetyClassifier`, `IntentDriftDetector`, `SemanticPiiRedactor`, `AnomalyScorer`, `GoalVerifier`, `ExplanationRequired`, `EnsembleDecision`.
43
+ - All guardrails hook into `Supervisor` via `pre_guardrails` / `post_guardrails`.
44
+ - Uniform `GuardrailResult(allowed, reason, replacement_output)` interface.
45
+
46
+ ## [0.88.0] — 2026-06-07
47
+
48
+ ### Added
49
+ - **LLM decisions**: `Pipeline.add_llm_decision()` for structured JSON decision steps. LLM reads previous output + session context, returns structured JSON for routing.
50
+ - **Stateful context**: `Pipeline.with_context(session_id)` for multi-run agents. Rolling history (last 20 runs) in session payload.
51
+ - **Stream input injection**: `Pipeline.run(initial_input=msg)` seeds the first step with a stream message payload.
52
+
53
+ ## [0.87.0] — 2026-06-06
54
+
55
+ ### Added
56
+ - **Streaming inputs**: `KafkaStreamConnector`, `KinesisStreamConnector`, `RedisStreamConnector`. At-least-once delivery. Optional extras: `agenthandler[kafka]`, `agenthandler[kinesis]`, `agenthandler[redis]`, `agenthandler[streams]`.
57
+
58
+ ## [0.86.0] — 2026-06-05
59
+
60
+ ### Added
61
+ - **Triggers and scheduling**: `Scheduler` with interval, cron, and DB watch. `WebhookTrigger` with REST endpoints for fire/enable/disable/remove/history.
62
+ - Dashboard trigger mode selection in agent creation flow.
63
+
64
+ ### Fixed
65
+ - Dashboard: merged agent and session creation into one flow.
66
+ - Dashboard: wired Agents tab to REST API for persistence across refreshes.
67
+ - Dashboard: fixed live agent cards to use same renderer as mock agents.
68
+ - Dashboard: added policies to creation flow, triggers to edit modal.
69
+
70
+ ## [0.85.0] — 2026-06-04
71
+
72
+ ### Added
73
+ - **Schema auto-discovery**: `SqlConnector.discover_schema()` introspects tables, columns, types, row counts. `schema_to_text()` for human-readable format. `MongoConnector.discover_schema()` samples documents.
74
+ - REST endpoint: `GET /pipelines/schema`.
75
+ - `PipelineBuilder` accepts `db_schema` so the LLM writes correct SQL.
76
+
77
+ ## [0.84.0] — 2026-06-03
78
+
79
+ ### Added
80
+ - Dashboard pipeline editor: natural language "Describe" mode + manual "Edit POML" mode.
81
+ - REST endpoints: `POST /pipelines/generate`, `POST /pipelines/validate`, `POST /pipelines/run`, `GET /pipelines/tools`.
82
+
83
+ ## [0.83.0] — 2026-06-02
84
+
85
+ ### Added
86
+ - **PipelineBuilder**: Natural language → POML → Pipeline via any LLM. `create()`, `create_poml()`, `refine()`.
87
+ - POML pipeline format: `<step>`, `<threshold>`, `<condition>` tags with XML parsing.
88
+
89
+ ## [0.82.0] — 2026-06-01
90
+
91
+ ### Added
92
+ - **Database connectors**: `SqlConnector` (SQLite/PostgreSQL/MySQL) and `MongoConnector`. Read-only by default. Parameterized queries, configurable `max_rows`.
93
+ - **Conditional routing**: `Pipeline.add_condition()` and `Pipeline.add_threshold()` for branching pipelines.
94
+
95
+ ## [0.81.0] — 2026-05-31
96
+
97
+ ### Added
98
+ - **Pipeline orchestration**: `Pipeline` class with `add_step()`, sequential execution, output chaining. Every step goes through full supervision.
99
+
100
+ ## [0.80.0] — 2026-05-30
101
+
102
+ ### Added
103
+ - OAuth2 support (GitHub, Google) via `register_oauth_routes()`.
104
+ - International PII patterns: UK/EU phone numbers, UK National Insurance, German Tax IDs, IBANs, passport numbers.
105
+ - Optional NLP augmentation for PII detection via spaCy NER.
106
+
107
+ ### Fixed
108
+ - Race conditions in `SessionManager`: per-session locking for concurrent lifecycle operations.
109
+ - Policy integrity: HMAC-SHA256 checksums prevent post-start policy tampering.
110
+ - Async timeout test flakiness (10ms→50ms thresholds).
111
+
112
+ ## [0.79.0] — 2026-05-29
113
+
114
+ ### Added
115
+ - **Privacy shielding**: `Redactor` with 9 regex categories (email, phone, SSN, credit card, API key, IP, national_id, IBAN, passport). Inbound/outbound/both directions.
116
+ - **Real-time dashboard**: WebSocket updates for session status changes.
117
+ - **Observability**: `Observer` with tool-level metrics, OpenTelemetry export.
118
+
119
+ ## [0.78.0] — 2026-05-28
120
+
121
+ ### Added
122
+ - **Human-in-the-loop approval**: `ApprovalQueue` with submit/approve/deny. `require_confirm` policy field. REST endpoints and WebSocket notifications. Dashboard approval cards.
123
+
124
+ ### Changed
125
+ - npm package renamed to `agenthandler-ai` (name `agenthandler` was taken).
126
+
127
+ ## [0.77.0] — 2026-05-27
128
+
129
+ ### Added
130
+ - **Durable sessions**: `SessionManager` with `start()`, `pause()`, `resume()`, `stop()`, `restart()`. `SqliteStore` and `MemoryStore`.
131
+ - **REST control plane**: FastAPI app with 20+ endpoints for session CRUD, metrics, audit logs.
132
+ - **API key auth**: Bearer token authentication via `AGENTHANDLER_API_KEY`.
133
+ - **Stateless sessions**: `stateless=True` for in-memory-only supervision.
134
+ - **Crash loop protection**: `max_resumes` with automatic failure marking.
135
+ - Lifecycle example: `examples/session_lifecycle.py`.
136
+ - CI pipeline with pytest, mypy, ruff.
@@ -0,0 +1,64 @@
1
+ # Contributing to AgentHandler
2
+
3
+ Thanks for your interest in contributing.
4
+
5
+ ## Setup
6
+
7
+ ```bash
8
+ git clone https://github.com/arunvenkatadri/AgentHandler.git
9
+ cd AgentHandler
10
+ pip install -e ".[dev]"
11
+ ```
12
+
13
+ ## Running checks
14
+
15
+ ```bash
16
+ # Tests
17
+ pytest tests/ -v
18
+
19
+ # Lint
20
+ ruff check .
21
+ ruff format --check .
22
+
23
+ # Type check
24
+ mypy agenthandler/
25
+ ```
26
+
27
+ All three must pass before submitting a PR.
28
+
29
+ ## Making changes
30
+
31
+ 1. Fork the repo and create a branch from `main`.
32
+ 2. Write tests for any new functionality.
33
+ 3. Make sure all checks pass.
34
+ 4. Open a PR with a clear description of what changed and why.
35
+
36
+ ## Project structure
37
+
38
+ ```
39
+ agenthandler/ Python library (zero dependencies)
40
+ tests/ Test suite (pytest)
41
+ examples/ Runnable examples
42
+ dashboard.html Agent management UI (single-file, no build step)
43
+ openclaw-plugin/ TypeScript plugin template for OpenClaw
44
+ ```
45
+
46
+ - **`agenthandler/`** — the core library. Skills are capabilities (tool collections). Agents use skills and are supervised by policies.
47
+ - **`dashboard.html`** — standalone UI for managing agents, skills, and conversations. Pure HTML/CSS/JS, no build tools. Open directly in a browser.
48
+ - **`openclaw-plugin/`** — TypeScript plugin that bridges agenthandler to OpenClaw.
49
+
50
+ ## Design principles
51
+
52
+ - **Zero dependencies.** Everything in `agenthandler/` uses only the Python standard library. If you need an external package, it goes in an example or optional integration.
53
+ - **Framework agnostic.** AgentHandler wraps tool calls — it doesn't own the agent loop. Don't add framework-specific code to the core.
54
+ - **Always return, never raise.** `Supervisor.call()` returns a `SupervisedResult`. Exceptions are for programming errors, not tool failures.
55
+ - **Thread safe by default.** Any shared state must be protected by a lock.
56
+ - **Agents and skills are separate.** Agents are supervised entities. Skills are reusable capabilities (tool collections) assigned to agents. Don't merge these concepts.
57
+
58
+ ## Reporting issues
59
+
60
+ Open an issue on GitHub. Include:
61
+ - What you expected to happen
62
+ - What actually happened
63
+ - Minimal reproduction steps
64
+ - Python version and OS
@@ -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
95
+ Derivative 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
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying 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.