asap-protocol 0.1.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.
- asap/__init__.py +7 -0
- asap/cli.py +220 -0
- asap/errors.py +150 -0
- asap/examples/README.md +25 -0
- asap/examples/__init__.py +1 -0
- asap/examples/coordinator.py +184 -0
- asap/examples/echo_agent.py +100 -0
- asap/examples/run_demo.py +120 -0
- asap/models/__init__.py +146 -0
- asap/models/base.py +55 -0
- asap/models/constants.py +14 -0
- asap/models/entities.py +410 -0
- asap/models/enums.py +71 -0
- asap/models/envelope.py +94 -0
- asap/models/ids.py +55 -0
- asap/models/parts.py +207 -0
- asap/models/payloads.py +423 -0
- asap/models/types.py +39 -0
- asap/observability/__init__.py +43 -0
- asap/observability/logging.py +216 -0
- asap/observability/metrics.py +399 -0
- asap/schemas.py +203 -0
- asap/state/__init__.py +22 -0
- asap/state/machine.py +86 -0
- asap/state/snapshot.py +265 -0
- asap/transport/__init__.py +84 -0
- asap/transport/client.py +399 -0
- asap/transport/handlers.py +444 -0
- asap/transport/jsonrpc.py +190 -0
- asap/transport/middleware.py +359 -0
- asap/transport/server.py +739 -0
- asap_protocol-0.1.0.dist-info/METADATA +251 -0
- asap_protocol-0.1.0.dist-info/RECORD +36 -0
- asap_protocol-0.1.0.dist-info/WHEEL +4 -0
- asap_protocol-0.1.0.dist-info/entry_points.txt +2 -0
- asap_protocol-0.1.0.dist-info/licenses/LICENSE +190 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: asap-protocol
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Async Simple Agent Protocol - A streamlined protocol for agent-to-agent communication
|
|
5
|
+
Project-URL: Homepage, https://github.com/adriannoes/asap-protocol
|
|
6
|
+
Project-URL: Documentation, https://adriannoes.github.io/asap-protocol
|
|
7
|
+
Project-URL: Repository, https://github.com/adriannoes/asap-protocol
|
|
8
|
+
Project-URL: Issues, https://github.com/adriannoes/asap-protocol/issues
|
|
9
|
+
Author: ASAP Protocol Contributors
|
|
10
|
+
License: Apache-2.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: a2a,agent,async,communication,mcp,protocol
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Classifier: Topic :: System :: Distributed Computing
|
|
20
|
+
Classifier: Typing :: Typed
|
|
21
|
+
Requires-Python: >=3.13
|
|
22
|
+
Requires-Dist: fastapi>=0.124
|
|
23
|
+
Requires-Dist: httpx>=0.28.1
|
|
24
|
+
Requires-Dist: packaging>=25.0
|
|
25
|
+
Requires-Dist: pydantic>=2.12.5
|
|
26
|
+
Requires-Dist: python-ulid>=3.0
|
|
27
|
+
Requires-Dist: structlog>=24.1
|
|
28
|
+
Requires-Dist: typer>=0.21.1
|
|
29
|
+
Requires-Dist: uvicorn>=0.34
|
|
30
|
+
Provides-Extra: dev
|
|
31
|
+
Requires-Dist: mypy>=1.19.1; extra == 'dev'
|
|
32
|
+
Requires-Dist: pip-audit>=2.7; extra == 'dev'
|
|
33
|
+
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest-benchmark>=5.1; extra == 'dev'
|
|
35
|
+
Requires-Dist: pytest-cov>=6.0; extra == 'dev'
|
|
36
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
37
|
+
Requires-Dist: ruff>=0.14.14; extra == 'dev'
|
|
38
|
+
Provides-Extra: docs
|
|
39
|
+
Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
|
|
40
|
+
Requires-Dist: mkdocstrings[python]>=0.27; extra == 'docs'
|
|
41
|
+
Description-Content-Type: text/markdown
|
|
42
|
+
|
|
43
|
+
# ASAP: Async Simple Agent Protocol
|
|
44
|
+
|
|
45
|
+
> A streamlined, scalable, asynchronous protocol for agent-to-agent communication and task coordination.
|
|
46
|
+
|
|
47
|
+
## Why ASAP?
|
|
48
|
+
|
|
49
|
+
Building multi-agent systems today suffers from three core technical challenges:
|
|
50
|
+
1. **$N^2$ Connection Complexity**: Most protocols assume static point-to-point HTTP connections that don't scale.
|
|
51
|
+
2. **State Drift**: Lack of native persistence makes it impossible to reliably resume long-running agentic workflows.
|
|
52
|
+
3. **Fragmentation**: No unified way to handle task delegation, artifact exchange, and tool execution (MCP) in a single envelope.
|
|
53
|
+
|
|
54
|
+
**ASAP** provides a production-ready communication layer that simplifies these complexities. It introduces a standardized, stateful orchestration framework that ensures your agents can coordinate reliably across distributed environments.
|
|
55
|
+
|
|
56
|
+
### Key Features
|
|
57
|
+
|
|
58
|
+
- **Stateful Orchestration**: Native task state machine with built-in snapshotting for durable, resumable agent workflows.
|
|
59
|
+
- **Schema-First Design**: Strict Pydantic v2 models providing automatic JSON Schema generation for guaranteed cross-agent interoperability.
|
|
60
|
+
- **High-Performance Core**: Built on Python 3.13+, leveraging `uvloop` (C) and `pydantic-core` (Rust) for ultra-low latency validation and I/O.
|
|
61
|
+
- **Observable Chains**: First-class support for `trace_id` and `correlation_id` to debug complex multi-agent delegation.
|
|
62
|
+
- **MCP Integration**: Uses the Model Context Protocol (MCP) as a tool-execution substrate, wrapped in a high-level coordination envelope.
|
|
63
|
+
- **Async-Native**: Engineered from the ground up for high-concurrency environments using `asyncio` and `httpx`. Supports both sync and async handlers with automatic event loop management.
|
|
64
|
+
|
|
65
|
+
> 💡 **Performance Note**: Pure Python codebase leveraging Rust-accelerated dependencies (`pydantic-core`, `orjson`, `python-ulid`) for native-level performance without build complexity.
|
|
66
|
+
|
|
67
|
+
## Installation
|
|
68
|
+
|
|
69
|
+
We recommend using [uv](https://github.com/astral-sh/uv) for dependency management:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
uv add asap-protocol
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Or with pip:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pip install asap-protocol
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
For reproducible environments, prefer `uv` when possible.
|
|
82
|
+
|
|
83
|
+
## Quick Start
|
|
84
|
+
|
|
85
|
+
### 1. Create an Agent (Server)
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
from asap.models.entities import Capability, Endpoint, Manifest, Skill
|
|
89
|
+
from asap.transport.handlers import HandlerRegistry, create_echo_handler
|
|
90
|
+
from asap.transport.server import create_app
|
|
91
|
+
|
|
92
|
+
manifest = Manifest(
|
|
93
|
+
id="urn:asap:agent:echo-agent",
|
|
94
|
+
name="Echo Agent",
|
|
95
|
+
version="0.1.0",
|
|
96
|
+
description="Echoes task input as output",
|
|
97
|
+
capabilities=Capability(
|
|
98
|
+
asap_version="0.1",
|
|
99
|
+
skills=[Skill(id="echo", description="Echo back the input")],
|
|
100
|
+
state_persistence=False,
|
|
101
|
+
),
|
|
102
|
+
endpoints=Endpoint(asap="http://127.0.0.1:8001/asap"),
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
registry = HandlerRegistry()
|
|
106
|
+
registry.register("task.request", create_echo_handler())
|
|
107
|
+
|
|
108
|
+
app = create_app(manifest, registry)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### 2. Send a Task (Client)
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
import asyncio
|
|
115
|
+
from asap.models.envelope import Envelope
|
|
116
|
+
from asap.models.payloads import TaskRequest
|
|
117
|
+
from asap.transport.client import ASAPClient
|
|
118
|
+
|
|
119
|
+
async def main():
|
|
120
|
+
request = TaskRequest(
|
|
121
|
+
conversation_id="conv_01HX5K3MQVN8",
|
|
122
|
+
skill_id="echo",
|
|
123
|
+
input={"message": "hello from client"},
|
|
124
|
+
)
|
|
125
|
+
envelope = Envelope(
|
|
126
|
+
asap_version="0.1",
|
|
127
|
+
sender="urn:asap:agent:client",
|
|
128
|
+
recipient="urn:asap:agent:echo-agent",
|
|
129
|
+
payload_type="task.request",
|
|
130
|
+
payload=request.model_dump(),
|
|
131
|
+
)
|
|
132
|
+
async with ASAPClient("http://127.0.0.1:8001") as client:
|
|
133
|
+
response = await client.send(envelope)
|
|
134
|
+
print(response.payload)
|
|
135
|
+
|
|
136
|
+
if __name__ == "__main__":
|
|
137
|
+
asyncio.run(main())
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## API Overview
|
|
141
|
+
|
|
142
|
+
Core models:
|
|
143
|
+
|
|
144
|
+
- `Envelope`: protocol wrapper with routing and tracing metadata
|
|
145
|
+
- `TaskRequest`, `TaskResponse`, `TaskUpdate`, `TaskCancel`: task lifecycle payloads
|
|
146
|
+
- `MessageSend`, `ArtifactNotify`: messaging and artifacts
|
|
147
|
+
- `StateQuery`, `StateRestore`: snapshot state operations
|
|
148
|
+
- `McpToolCall`, `McpToolResult`, `McpResourceFetch`, `McpResourceData`: MCP integration
|
|
149
|
+
|
|
150
|
+
Transport:
|
|
151
|
+
|
|
152
|
+
- `create_app`: FastAPI application factory
|
|
153
|
+
- `HandlerRegistry`: payload dispatch registry (supports both sync and async handlers)
|
|
154
|
+
- `ASAPClient`: async HTTP client with automatic retry for server errors (5xx)
|
|
155
|
+
|
|
156
|
+
## Documentation
|
|
157
|
+
|
|
158
|
+
- [Spec](.cursor/docs/general-specs.md)
|
|
159
|
+
- [Docs](docs/index.md)
|
|
160
|
+
- [API Reference](docs/api-reference.md)
|
|
161
|
+
|
|
162
|
+
## Advanced Examples
|
|
163
|
+
|
|
164
|
+
### State Snapshots
|
|
165
|
+
|
|
166
|
+
```python
|
|
167
|
+
from datetime import datetime, timezone
|
|
168
|
+
from asap.models.entities import StateSnapshot
|
|
169
|
+
from asap.state import InMemorySnapshotStore
|
|
170
|
+
|
|
171
|
+
store = InMemorySnapshotStore()
|
|
172
|
+
snapshot = StateSnapshot(
|
|
173
|
+
id="snap_01HX5K7R...",
|
|
174
|
+
task_id="task_01HX5K4N...",
|
|
175
|
+
version=1,
|
|
176
|
+
data={"status": "submitted", "progress": 0},
|
|
177
|
+
created_at=datetime.now(timezone.utc),
|
|
178
|
+
)
|
|
179
|
+
store.save(snapshot)
|
|
180
|
+
latest = store.get("task_01HX5K4N...")
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### Error Recovery
|
|
184
|
+
|
|
185
|
+
```python
|
|
186
|
+
from asap.errors import InvalidTransitionError
|
|
187
|
+
|
|
188
|
+
try:
|
|
189
|
+
raise InvalidTransitionError(from_state="submitted", to_state="completed")
|
|
190
|
+
except InvalidTransitionError as exc:
|
|
191
|
+
payload = exc.to_dict()
|
|
192
|
+
print(payload["code"])
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### Async Handlers
|
|
196
|
+
|
|
197
|
+
Handlers can be either synchronous or asynchronous:
|
|
198
|
+
|
|
199
|
+
```python
|
|
200
|
+
# Sync handler
|
|
201
|
+
def my_sync_handler(envelope: Envelope, manifest: Manifest) -> Envelope:
|
|
202
|
+
# Process synchronously
|
|
203
|
+
return response_envelope
|
|
204
|
+
|
|
205
|
+
# Async handler
|
|
206
|
+
async def my_async_handler(envelope: Envelope, manifest: Manifest) -> Envelope:
|
|
207
|
+
# Process asynchronously (e.g., database calls, API requests)
|
|
208
|
+
result = await some_async_operation()
|
|
209
|
+
return response_envelope
|
|
210
|
+
|
|
211
|
+
registry.register("task.request", my_async_handler) # Works with both!
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Multi-Agent Flow
|
|
215
|
+
|
|
216
|
+
Run the built-in demo to see two agents exchanging messages:
|
|
217
|
+
|
|
218
|
+
```bash
|
|
219
|
+
uv run python -m asap.examples.run_demo
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### CLI Tools
|
|
223
|
+
|
|
224
|
+
The ASAP CLI provides utilities for schema management:
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
# Export all JSON schemas
|
|
228
|
+
asap export-schemas --output-dir ./schemas
|
|
229
|
+
|
|
230
|
+
# List available schemas
|
|
231
|
+
asap list-schemas
|
|
232
|
+
|
|
233
|
+
# Show a specific schema
|
|
234
|
+
asap show-schema envelope
|
|
235
|
+
|
|
236
|
+
# Validate JSON against a schema
|
|
237
|
+
asap validate-schema message.json --schema-type envelope
|
|
238
|
+
|
|
239
|
+
# Verbose output
|
|
240
|
+
asap export-schemas --verbose
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
## Contributing
|
|
244
|
+
|
|
245
|
+
We love contributions! Whether it's fixing a bug, improving documentation, or proposing a new feature, your help is welcome.
|
|
246
|
+
|
|
247
|
+
Check out our [Contributing Guidelines](CONTRIBUTING.md) to get started. It's easier than you think! 🚀
|
|
248
|
+
|
|
249
|
+
## License
|
|
250
|
+
|
|
251
|
+
This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
asap/__init__.py,sha256=YW8oB4OJk7hQo15mjC11rBxXws105kyFXhM_TemD2nI,169
|
|
2
|
+
asap/cli.py,sha256=JzMA3t2Gn94kunkn5bgAkl6ZgzgwGtL5QFcKLYqWZYA,6621
|
|
3
|
+
asap/errors.py,sha256=S0eifqXZd1f9PJKeo8EKF0x1-Yh5m6eGWoxCVEYgeRg,4994
|
|
4
|
+
asap/schemas.py,sha256=c9MttEoI4mgXFHDFzphSRAJhw7cpy2rcnXH31jlo1sQ,6135
|
|
5
|
+
asap/examples/README.md,sha256=xqMIMcZANi1eML6t4cNJ3rG6MjySf2SchgFiecxKpik,765
|
|
6
|
+
asap/examples/__init__.py,sha256=LaEkmPQ4tpYrkLFjBE_aodjW3_XUcKWoFLGVFD5kuvo,56
|
|
7
|
+
asap/examples/coordinator.py,sha256=hBwyNgJ7SgBl8OoliLtiaN_dpOVW2UXgwje05ThgvJc,5370
|
|
8
|
+
asap/examples/echo_agent.py,sha256=WW-p8fpBvdbRylYSbPqjMkUfSNjqXdi5QL6XLjHoQYM,2947
|
|
9
|
+
asap/examples/run_demo.py,sha256=bFHH4IY-xYXIw66opgKGfmuXSC7_6astkERLtN0a9pw,3700
|
|
10
|
+
asap/models/__init__.py,sha256=iUriI2CN9NcpH1_TyY5PkWiX3Mz7UnJDC9IeJzcWFUI,2511
|
|
11
|
+
asap/models/base.py,sha256=PvLkFinOzfU6DDJ4pXMku7PK_2Xsaprh055mJKbdPUA,2008
|
|
12
|
+
asap/models/constants.py,sha256=Ur8ngPehsOZtFUicVtdHbn1LhsvKjMDqgGMVA7X4kHs,360
|
|
13
|
+
asap/models/entities.py,sha256=siZCt-XqbOSPleXFBvwCSC9sVfZCrydNrUiKso8RHDo,16742
|
|
14
|
+
asap/models/enums.py,sha256=q8tnW10AT94hxDFoH1Psg1a1x4tzs47x12N7RTGLNRQ,1644
|
|
15
|
+
asap/models/envelope.py,sha256=MTlFEmYcT47gpQhOxWYGEUe99hw_woMWqWdp3rZl-co,3733
|
|
16
|
+
asap/models/ids.py,sha256=ttTebUohYD_7Gmyg1GRi1jnRtnLcAL2SiXuOi4vGtb0,1425
|
|
17
|
+
asap/models/parts.py,sha256=XiNvlEEqqb0W8cvvvLHYfzYzLULg7oFStMxm817-IZo,6939
|
|
18
|
+
asap/models/payloads.py,sha256=l0taURdWy09BASSJkiCrR6VixbqzD3HrFdVrFad7YqQ,14867
|
|
19
|
+
asap/models/types.py,sha256=ldWyz6gThlK_cxywxfcIiMLD74_BRV0lbfyussvSURg,978
|
|
20
|
+
asap/observability/__init__.py,sha256=V1bBAZix7_IAoy09ETTlkSsi-1ENq5_EpBhi599EBxE,1145
|
|
21
|
+
asap/observability/logging.py,sha256=1nK1OP-3BBpOf8d5UFmpSP8_mULF5kZ27YoS3S3U1a0,6733
|
|
22
|
+
asap/observability/metrics.py,sha256=k0nr5Ovj0dJBuK1YVy3GvkL2IQSjxMq9FHp4MHT7C2U,14685
|
|
23
|
+
asap/state/__init__.py,sha256=bV1oO86TReF48C5IaglNr8WHczzAWTpw3n7SyDw04nk,565
|
|
24
|
+
asap/state/machine.py,sha256=1Obl1BcwwU-Xz20MX-layuPh1BVzcI1Kiowl_CueuU4,2795
|
|
25
|
+
asap/state/snapshot.py,sha256=wPc2pnQD_EdPecEndbjIC9mXJep-LCJwtdazGMJSUJc,8654
|
|
26
|
+
asap/transport/__init__.py,sha256=rX_hcnm0c-XxJKvxc4H2b_APNIVmdvXphRIqDrDWC8U,2506
|
|
27
|
+
asap/transport/client.py,sha256=fHzz8M_qeNMLZhDxsOWeAVMXMNeOHFnmovptBMDsN2I,14325
|
|
28
|
+
asap/transport/handlers.py,sha256=t7VKooeoP4eaqV4IFCymCIEECDBk3KxNgC5x2D_FJ00,15238
|
|
29
|
+
asap/transport/jsonrpc.py,sha256=Cnh6ahoXr4Dkmt2KqoXESDKKs_9MwfsgIjn-TDjpkEQ,5800
|
|
30
|
+
asap/transport/middleware.py,sha256=bijTgqKbYQ32Wz869y2nCPNs7YGXgoQc6xxagdqZbC0,12666
|
|
31
|
+
asap/transport/server.py,sha256=7bMecSo8w__wwlmAe-kwYAJoZ3e6cz590_QCf8m0x70,27924
|
|
32
|
+
asap_protocol-0.1.0.dist-info/METADATA,sha256=DRmzSrjqSZaGbaaTrIkX7EZR-Gg3duaNZYI8SK7Y0a8,8342
|
|
33
|
+
asap_protocol-0.1.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
34
|
+
asap_protocol-0.1.0.dist-info/entry_points.txt,sha256=H_u_JamRG5mGQTXwnCFljBFep6lZPuln9NPLfgq1naM,39
|
|
35
|
+
asap_protocol-0.1.0.dist-info/licenses/LICENSE,sha256=JmjzvAfg8BUP_0y_hu4SQSUgnSniWe2eBS7x2WPTo2A,10771
|
|
36
|
+
asap_protocol-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,190 @@
|
|
|
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
|
+
Copyright 2026 ASAP Protocol Contributors
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|