tidelight 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.
tidelight/__init__.py ADDED
@@ -0,0 +1,5 @@
1
+ """Tidelight Intelligence Cloud Python client."""
2
+
3
+ from .client import ApiError, Client, Instrument, InstrumentPage, ResearchJob
4
+
5
+ __all__ = ["ApiError", "Client", "Instrument", "InstrumentPage", "ResearchJob"]
tidelight/client.py ADDED
@@ -0,0 +1,263 @@
1
+ """Read-only Tidelight API client; requires Python 3.10 or later."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import json
6
+ import re
7
+ import time
8
+ from dataclasses import dataclass
9
+ from typing import Any, Callable, Iterator
10
+ from urllib.error import HTTPError, URLError
11
+ from urllib.parse import urlencode, urlparse
12
+ from urllib.request import HTTPRedirectHandler, Request, build_opener
13
+
14
+
15
+ class _NoRedirect(HTTPRedirectHandler):
16
+ """Keep bearer credentials on the configured API origin."""
17
+
18
+ def redirect_request(self, request, response, code, message, headers, new_url):
19
+ return None
20
+
21
+
22
+ @dataclass(frozen=True)
23
+ class Instrument:
24
+ symbol: str
25
+ instrument_type: str
26
+ underlying_ticker: str
27
+ issuer_name: str
28
+ quote_currency: str
29
+ last_price: float
30
+ change_24h: float | None
31
+ provider_timestamp: int | None
32
+ market_session_status: str
33
+ source: str
34
+
35
+
36
+ @dataclass(frozen=True)
37
+ class InstrumentPage:
38
+ data: list[Instrument]
39
+ next_cursor: str | None
40
+ generated_at: int
41
+ request_id: str
42
+
43
+
44
+ @dataclass(frozen=True)
45
+ class ResearchJob:
46
+ job_id: str
47
+ ticker: str
48
+ status: str
49
+ attempts: int
50
+ max_attempts: int
51
+ result: dict[str, Any] | None
52
+ error: dict[str, str] | None
53
+ created_at: str
54
+ started_at: str | None
55
+ completed_at: str | None
56
+ retry_at: str | None
57
+ request_id: str
58
+
59
+
60
+ class ApiError(Exception):
61
+ def __init__(self, status: int, code: str, message: str, request_id: str | None = None):
62
+ super().__init__(message)
63
+ self.status = status
64
+ self.code = code
65
+ self.request_id = request_id
66
+
67
+
68
+ class Client:
69
+ def __init__(self, api_key: str, *, base_url: str = "https://api.tidelight.app/v1", timeout: float = 10, max_retries: int = 2, opener: Callable[..., Any] | None = None, sleeper: Callable[[float], None] = time.sleep):
70
+ if not re.fullmatch(r"tl_(test|live)_[A-Za-z0-9_-]{43}", api_key):
71
+ raise ValueError("A valid Tidelight API key is required.")
72
+ parsed = urlparse(base_url)
73
+ if parsed.scheme != "https" and not (parsed.scheme == "http" and parsed.hostname in {"localhost", "127.0.0.1"}):
74
+ raise ValueError("The API URL must use HTTPS.")
75
+ if parsed.scheme == "https" and (parsed.hostname != "api.tidelight.app" or parsed.port not in (None, 443)):
76
+ raise ValueError("The API URL must use api.tidelight.app over HTTPS.")
77
+ if parsed.username or parsed.password or parsed.query or parsed.fragment:
78
+ raise ValueError("The API URL cannot contain credentials, query, or fragment.")
79
+ if not 0.1 <= timeout <= 120:
80
+ raise ValueError("timeout must be 0.1 to 120 seconds.")
81
+ if not isinstance(max_retries, int) or not 0 <= max_retries <= 5:
82
+ raise ValueError("max_retries must be 0 to 5.")
83
+ self._api_key = api_key
84
+ self._base_url = base_url.rstrip("/")
85
+ self._timeout = timeout
86
+ self._max_retries = max_retries
87
+ self._opener = opener or build_opener(_NoRedirect()).open
88
+ self._sleeper = sleeper
89
+
90
+ def list_tokenized_equities(self, *, limit: int = 20, cursor: str | None = None, underlying_ticker: str | None = None) -> InstrumentPage:
91
+ if not isinstance(limit, int) or not 1 <= limit <= 100:
92
+ raise ValueError("limit must be 1 to 100.")
93
+ if cursor is not None and not re.fullmatch(r"[A-Z0-9]{2,32}", cursor):
94
+ raise ValueError("Invalid instrument cursor.")
95
+ if underlying_ticker is not None and not re.fullmatch(r"[A-Z][A-Z0-9.]{0,9}", underlying_ticker.upper()):
96
+ raise ValueError("Invalid underlying_ticker.")
97
+ params = {"kind": "rtoken", "limit": str(limit)}
98
+ if cursor is not None:
99
+ params["cursor"] = cursor
100
+ if underlying_ticker is not None:
101
+ params["underlying_ticker"] = underlying_ticker.upper()
102
+ url = f"{self._base_url}/market/instruments?{urlencode(params)}"
103
+ request = Request(url, headers={"Authorization": f"Bearer {self._api_key}", "Accept": "application/json"})
104
+ for attempt in range(self._max_retries + 1):
105
+ try:
106
+ with self._opener(request, timeout=self._timeout) as response:
107
+ payload = json.load(response)
108
+ if not isinstance(payload, dict) or not isinstance(payload.get("data"), list):
109
+ raise ApiError(response.status, "invalid_response", "The Tidelight API returned an invalid response.", response.headers.get("X-Request-Id"))
110
+ return InstrumentPage(
111
+ data=[Instrument(**item) for item in payload["data"]],
112
+ next_cursor=payload.get("next_cursor"),
113
+ generated_at=payload["generated_at"],
114
+ request_id=payload["request_id"],
115
+ )
116
+ except HTTPError as error:
117
+ try:
118
+ details = json.load(error).get("error", {})
119
+ except (ValueError, AttributeError):
120
+ details = {}
121
+ if error.code in {429, 502, 503, 504} and details.get("code") != "provider_terms_unconfirmed" and attempt < self._max_retries:
122
+ self._pause(attempt, error.headers.get("Retry-After"))
123
+ continue
124
+ raise ApiError(error.code, details.get("code", "api_error"), details.get("message", "Tidelight API request failed."), details.get("request_id") or error.headers.get("X-Request-Id")) from None
125
+ except (URLError, TimeoutError, OSError):
126
+ if attempt >= self._max_retries:
127
+ raise ApiError(0, "network_error", "The Tidelight API could not be reached.") from None
128
+ self._pause(attempt, None)
129
+ raise RuntimeError("Unreachable retry state")
130
+
131
+ def tokenized_equities(self, *, limit: int = 20) -> Iterator[Instrument]:
132
+ cursor = None
133
+ while True:
134
+ page = self.list_tokenized_equities(limit=limit, cursor=cursor)
135
+ yield from page.data
136
+ if page.next_cursor is None:
137
+ return
138
+ if page.next_cursor == cursor:
139
+ raise ApiError(0, "invalid_response", "The API returned a repeated pagination cursor.", page.request_id)
140
+ cursor = page.next_cursor
141
+
142
+ def start_company_research(self, ticker: str, idempotency_key: str) -> dict[str, Any]:
143
+ if not isinstance(ticker, str) or not re.fullmatch(r"[A-Za-z][A-Za-z0-9.]{0,9}", ticker):
144
+ raise ValueError("ticker must be a supported stock symbol.")
145
+ if not isinstance(idempotency_key, str) or not re.fullmatch(r"[A-Za-z0-9._:-]{8,128}", idempotency_key):
146
+ raise ValueError("idempotency_key must be 8 to 128 valid characters.")
147
+ return self._job_request("/research/jobs", "POST", {"ticker": ticker}, idempotency_key)
148
+
149
+ def get_research_job(self, job_id: str) -> ResearchJob:
150
+ if not isinstance(job_id, str) or not re.fullmatch(r"[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", job_id, re.I):
151
+ raise ValueError("Invalid research job ID.")
152
+ return ResearchJob(**self._job_request(f"/research/jobs/{job_id}", "GET"))
153
+
154
+ def cancel_research_job(self, job_id: str) -> dict[str, Any]:
155
+ if not isinstance(job_id, str) or not re.fullmatch(r"[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", job_id, re.I):
156
+ raise ValueError("Invalid research job ID.")
157
+ return self._job_request(f"/research/jobs/{job_id}", "DELETE")
158
+
159
+ def wait_for_research_job(self, job_id: str, *, interval: float = 2, timeout: float = 120) -> ResearchJob:
160
+ if not 0.25 <= interval <= 30 or not interval <= timeout <= 600:
161
+ raise ValueError("Polling interval or timeout is out of range.")
162
+ deadline = time.monotonic() + timeout
163
+ while time.monotonic() < deadline:
164
+ job = self.get_research_job(job_id)
165
+ if job.status in {"complete", "failed", "cancelled"}:
166
+ return job
167
+ self._sleeper(min(interval, max(0, deadline - time.monotonic())))
168
+ raise ApiError(0, "poll_timeout", "The research job did not finish before the polling timeout.")
169
+
170
+ def list_webhooks(self) -> dict[str, Any]:
171
+ return self._job_request("/webhooks", "GET")
172
+
173
+ def create_webhook(self, *, name: str, url: str, events: list[str]) -> dict[str, Any]:
174
+ self._validate_webhook_input(name, url, events)
175
+ return self._job_request("/webhooks", "POST", {"name": name, "url": url, "events": events}, retry_safe=False)
176
+
177
+ def update_webhook(self, endpoint_id: str, **changes: Any) -> dict[str, Any]:
178
+ self._validate_webhook_id(endpoint_id)
179
+ allowed = {"name", "url", "events", "enabled", "rotate_secret"}
180
+ if not changes or set(changes) - allowed:
181
+ raise ValueError("Provide at least one supported webhook change.")
182
+ if "name" in changes and (not isinstance(changes["name"], str) or not 2 <= len(changes["name"].strip()) <= 80):
183
+ raise ValueError("Webhook name must be 2 to 80 characters.")
184
+ if "url" in changes:
185
+ self._validate_webhook_url(changes["url"])
186
+ if "events" in changes:
187
+ self._validate_webhook_events(changes["events"])
188
+ if "enabled" in changes and not isinstance(changes["enabled"], bool):
189
+ raise ValueError("enabled must be a boolean.")
190
+ if "rotate_secret" in changes and changes["rotate_secret"] is not True:
191
+ raise ValueError("rotate_secret can only be true.")
192
+ return self._job_request(f"/webhooks/{endpoint_id}", "PATCH", changes, retry_safe=False)
193
+
194
+ def disable_webhook(self, endpoint_id: str) -> dict[str, Any]:
195
+ self._validate_webhook_id(endpoint_id)
196
+ return self._job_request(f"/webhooks/{endpoint_id}", "DELETE", retry_safe=False)
197
+
198
+ def list_webhook_deliveries(self) -> dict[str, Any]:
199
+ return self._job_request("/webhooks/deliveries", "GET")
200
+
201
+ @staticmethod
202
+ def _validate_webhook_id(endpoint_id: str) -> None:
203
+ if not isinstance(endpoint_id, str) or not re.fullmatch(r"[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}", endpoint_id, re.I):
204
+ raise ValueError("Invalid webhook endpoint ID.")
205
+
206
+ @staticmethod
207
+ def _validate_webhook_url(url: str) -> None:
208
+ if not isinstance(url, str) or len(url) > 2048:
209
+ raise ValueError("Webhook URL must be a valid public HTTPS URL.")
210
+ parsed = urlparse(url)
211
+ if parsed.scheme != "https" or parsed.port not in (None, 443) or not parsed.hostname or parsed.username or parsed.password or parsed.query or parsed.fragment:
212
+ raise ValueError("Webhook URL must use public HTTPS on port 443 without credentials, query, or fragment.")
213
+
214
+ @staticmethod
215
+ def _validate_webhook_events(events: list[str]) -> None:
216
+ allowed = {"research.job.completed", "research.job.failed"}
217
+ if not isinstance(events, list) or not 1 <= len(events) <= 2 or any(not isinstance(event, str) or event not in allowed for event in events) or len(set(events)) != len(events):
218
+ raise ValueError("Choose one or more supported webhook events.")
219
+
220
+ @classmethod
221
+ def _validate_webhook_input(cls, name: str, url: str, events: list[str]) -> None:
222
+ if not isinstance(name, str) or not 2 <= len(name.strip()) <= 80:
223
+ raise ValueError("Webhook name must be 2 to 80 characters.")
224
+ cls._validate_webhook_url(url)
225
+ cls._validate_webhook_events(events)
226
+
227
+ def _job_request(self, path: str, method: str, body: dict[str, Any] | None = None, idempotency_key: str | None = None, *, retry_safe: bool = True) -> dict[str, Any]:
228
+ headers = {"Authorization": f"Bearer {self._api_key}", "Accept": "application/json"}
229
+ data = None
230
+ if body is not None:
231
+ data = json.dumps(body).encode()
232
+ headers["Content-Type"] = "application/json"
233
+ if idempotency_key:
234
+ headers["Idempotency-Key"] = idempotency_key
235
+ url = f"{self._base_url}{path}"
236
+ retry_limit = self._max_retries if retry_safe else 0
237
+ for attempt in range(retry_limit + 1):
238
+ request = Request(url, data=data, headers=headers, method=method)
239
+ try:
240
+ with self._opener(request, timeout=self._timeout) as response:
241
+ payload = json.load(response)
242
+ if not isinstance(payload, dict):
243
+ raise ApiError(response.status, "invalid_response", "The Tidelight API returned an invalid response.", response.headers.get("X-Request-Id"))
244
+ return payload
245
+ except HTTPError as error:
246
+ try:
247
+ details = json.load(error).get("error", {})
248
+ except (ValueError, AttributeError):
249
+ details = {}
250
+ if error.code in {429, 502, 503, 504} and details.get("code") != "provider_terms_unconfirmed" and attempt < retry_limit:
251
+ self._pause(attempt, error.headers.get("Retry-After")); continue
252
+ raise ApiError(error.code, details.get("code", "api_error"), details.get("message", "Tidelight API request failed."), details.get("request_id") or error.headers.get("X-Request-Id")) from None
253
+ except (URLError, TimeoutError, OSError):
254
+ if attempt >= self._max_retries:
255
+ raise ApiError(0, "network_error", "The Tidelight API could not be reached.") from None
256
+ self._pause(attempt, None)
257
+ raise RuntimeError("Unreachable retry state")
258
+
259
+ def _pause(self, attempt: int, retry_after: str | None) -> None:
260
+ delay = min(2.0, 0.25 * 2**attempt)
261
+ if retry_after and retry_after.isdigit():
262
+ delay = min(5.0, float(retry_after))
263
+ self._sleeper(delay)
@@ -0,0 +1,71 @@
1
+ Metadata-Version: 2.4
2
+ Name: tidelight
3
+ Version: 0.1.0
4
+ Summary: Official Tidelight Intelligence Cloud Python client
5
+ Author: TidelightOrg
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://tidelight.app/developers/packages/python
8
+ Project-URL: Documentation, https://dev.tidelight.app/api
9
+ Project-URL: Repository, https://github.com/TidelightOrg/tidelight/tree/main/sdk/python
10
+ Project-URL: Source, https://github.com/TidelightOrg/tidelight/tree/main/sdk/python
11
+ Project-URL: Issues, https://github.com/TidelightOrg/tidelight/issues
12
+ Project-URL: Security, https://github.com/TidelightOrg/tidelight/security/policy
13
+ Keywords: tidelight,research,market-intelligence,webhooks
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ License-File: NOTICE
19
+ Dynamic: license-file
20
+
21
+ # Tidelight Python SDK
22
+
23
+ Official Python client for supported Tidelight Intelligence Cloud v1 market, asynchronous company research, and webhook endpoints. Market calls require `market:read`; research calls require `research:run`; webhook calls require `alerts:manage`. Market responses can be denied with `provider_terms_unconfirmed` until redistribution terms are confirmed. The client surfaces that gate without retrying it.
24
+
25
+ Install with `python -m pip install tidelight`. Keep the API key on your server.
26
+
27
+ ```python
28
+ import os
29
+ from tidelight import Client
30
+
31
+ client = Client(os.environ["TIDELIGHT_API_KEY"])
32
+ page = client.list_tokenized_equities(limit=20, underlying_ticker="AAPL")
33
+ for instrument in page.data:
34
+ print(instrument.symbol, instrument.underlying_ticker)
35
+
36
+ for instrument in client.tokenized_equities(limit=50):
37
+ print(instrument.symbol)
38
+
39
+ import uuid
40
+ accepted = client.start_company_research("NVDA", str(uuid.uuid4()))
41
+ result = client.wait_for_research_job(accepted["job_id"], interval=2, timeout=120)
42
+ if result.status == "complete":
43
+ print(result.result)
44
+
45
+ created = client.create_webhook(
46
+ name="Research events",
47
+ url="https://your-service.example/tidelight",
48
+ events=["research.job.completed", "research.job.failed"],
49
+ )
50
+ signing_secret = created.get("signing_secret")
51
+ if not signing_secret:
52
+ raise RuntimeError("The create response did not include its one-time signing secret")
53
+ # TODO: Persist signing_secret with your approved secrets manager before
54
+ # finishing setup. Do not print it. It cannot be recovered by listing the endpoint.
55
+ deliveries = client.list_webhook_deliveries()
56
+ ```
57
+
58
+ Webhook mutations are not retried automatically because the API does not yet accept webhook idempotency keys; this avoids duplicate endpoint creation or secret rotation after an ambiguous timeout. Webhook destination reachability and DNS safety are checked by the API. A client-side HTTPS check is not an authorization to deliver to a destination.
59
+
60
+ The client retries network errors, 429, and transient 5xx statuses at most twice by default, except `provider_terms_unconfirmed`, which is returned immediately. It enforces a 10 second request timeout and raises `ApiError` with status, code, and request ID. The default transport does not follow redirects, and remote API URLs are restricted to `api.tidelight.app` so bearer credentials remain scoped to Tidelight.
61
+
62
+ ## Run the asynchronous research example
63
+
64
+ From a mother-repository checkout:
65
+
66
+ ```sh
67
+ python -m pip install -e ./sdk/python
68
+ PYTHONPATH=sdk/python/src python sdk/python/examples/research.py NVDA
69
+ ```
70
+
71
+ The example calls the SDK company snapshot job flow and prints a result only after the API reports `complete`. It preserves job and request IDs and never prints the key. CI injects a mock transport and makes no network calls. A live run requires `research:run` and consumes project quota (10 jobs per rolling hour).
@@ -0,0 +1,8 @@
1
+ tidelight/__init__.py,sha256=OCU09q5ipoFAGerUQYSa5mtHHnMah13I-WkuLmMfbL8,210
2
+ tidelight/client.py,sha256=cibUt3JBXH5Qrg3YlOw5rNfKdbFHCp1pkx-xC4eShi8,13883
3
+ tidelight-0.1.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
4
+ tidelight-0.1.0.dist-info/licenses/NOTICE,sha256=yBbphLKdYMFRmZfM9UXiF8L6avzy5olenTY7v4hyZFE,543
5
+ tidelight-0.1.0.dist-info/METADATA,sha256=2lysusCex5Pc588MJ-5t57tWF73HFR2GCrXFFa_lcGA,3762
6
+ tidelight-0.1.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
7
+ tidelight-0.1.0.dist-info/top_level.txt,sha256=ZZm-txypR6KF0S5TE1i8CdAu3PnUMRZMn3RQ_ChePHo,10
8
+ tidelight-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,5 @@
1
+ Copyright 2026 TidelightOrg
2
+
3
+ This package contains Tidelight-authored package source and documentation in this package directory. Those package files are licensed under the Apache License, Version 2.0 (see LICENSE).
4
+
5
+ This package-scoped license does not apply to the mother repository as a whole, Tidelight's proprietary application or backend, research engines, provider integrations, server secrets, or commercial infrastructure. Third-party dependencies retain their own licenses. Tidelight names and marks are not licensed by this notice.
@@ -0,0 +1 @@
1
+ tidelight