@dudko.dev/baton-format 0.1.0
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.
- package/LICENSE +538 -0
- package/README.md +39 -0
- package/dist/src/errors.d.ts +8 -0
- package/dist/src/errors.js +13 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.js +5 -0
- package/dist/src/parse.d.ts +11 -0
- package/dist/src/parse.js +459 -0
- package/dist/src/serialize.d.ts +11 -0
- package/dist/src/serialize.js +334 -0
- package/dist/src/types.d.ts +164 -0
- package/dist/src/types.js +9 -0
- package/package.json +44 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
Baton Node Packages — Proprietary License (Small Entity Commercial Grant)
|
|
2
|
+
|
|
3
|
+
Copyright © 2026 Siarhei Dudko. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Author / Licensor: Siarhei Dudko <siarhei@dudko.dev> — https://dudko.dev
|
|
6
|
+
|
|
7
|
+
This License governs the three Baton Node packages named in Section 1.1 and
|
|
8
|
+
nothing else. The rest of the Baton project — the Baton application for
|
|
9
|
+
desktop, mobile, and web, its Dart packages, and the distribution website —
|
|
10
|
+
stays under the repository's root LICENSE, which this License does not
|
|
11
|
+
change.
|
|
12
|
+
|
|
13
|
+
This is a proprietary license. The Packages are NOT open source and NOT free
|
|
14
|
+
software. Read this License before installing or using them. By installing or
|
|
15
|
+
using any of the Packages You accept this License in full. If You do not
|
|
16
|
+
accept it, do not install or use them.
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
============================================================================
|
|
20
|
+
IN SHORT
|
|
21
|
+
|
|
22
|
+
YES Use them free for anything personal or non-commercial.
|
|
23
|
+
YES Use them free at work, while your group is under ALL THREE of:
|
|
24
|
+
- under USD 250,000 ever raised from investors
|
|
25
|
+
- valued at under USD 250,000
|
|
26
|
+
- under USD 1,000,000 annual gross revenue
|
|
27
|
+
YES npm install, lockfiles, your own registry proxy, images you build
|
|
28
|
+
for your own infrastructure.
|
|
29
|
+
YES Read the source under `js/`, build it, and run its tests to check
|
|
30
|
+
what it does. Evaluation only; Section 2.5 sets the limits.
|
|
31
|
+
|
|
32
|
+
NO Modifying, forking, or vendoring them into something you ship.
|
|
33
|
+
NO Republishing or redistributing them.
|
|
34
|
+
NO Commercial use above any one of the three limits — write to
|
|
35
|
+
siarhei@dudko.dev and buy a license instead.
|
|
36
|
+
|
|
37
|
+
NOTE If your permission is ever revoked without you having broken
|
|
38
|
+
anything, it runs for six more months so you can migrate —
|
|
39
|
+
Section 15.2. Breaking the terms still ends it on the spot.
|
|
40
|
+
|
|
41
|
+
NOTE Send a pull request and the code in it becomes the author's —
|
|
42
|
+
Section 19. If that is not what you want, don't send one.
|
|
43
|
+
|
|
44
|
+
NOTE No warranty of any kind. You carry the risk of every request these
|
|
45
|
+
packages send and every file they write, and you indemnify the
|
|
46
|
+
author. Sections 9 through 14 spell that out, and they are not
|
|
47
|
+
boilerplate — read them.
|
|
48
|
+
|
|
49
|
+
This summary is orientation only. It is NOT part of the License and grants
|
|
50
|
+
nothing. Where it and the numbered Sections differ, the Sections govern.
|
|
51
|
+
============================================================================
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
1. DEFINITIONS
|
|
55
|
+
|
|
56
|
+
1.1. "Packages" means, in every form the Licensor publishes them — npm
|
|
57
|
+
tarballs and the Licensor's container images alike:
|
|
58
|
+
- @dudko.dev/baton-format
|
|
59
|
+
- @dudko.dev/baton-worker (including ghcr.io/dudko-dev/baton-worker)
|
|
60
|
+
- @dudko.dev/baton-mcp
|
|
61
|
+
1.2. "Official Distribution" means a copy of a Package obtained from the npm
|
|
62
|
+
registry at registry.npmjs.org or from a container registry the Licensor
|
|
63
|
+
publishes to.
|
|
64
|
+
1.3. "You" / "Your" means any individual or legal entity that installs or
|
|
65
|
+
uses any of the Packages.
|
|
66
|
+
1.4. "Your Group" means You together with Your parent entities, subsidiaries,
|
|
67
|
+
and entities under common control with You, taken as a whole.
|
|
68
|
+
1.5. "Commercial Use" means any use that is primarily intended for or
|
|
69
|
+
directed toward commercial advantage, revenue, or monetary
|
|
70
|
+
compensation, including use by, for, or within a business,
|
|
71
|
+
organization, or government body, use in providing paid or for-profit
|
|
72
|
+
services, and use as part of internal business operations.
|
|
73
|
+
1.6. "Qualifying Small Entity" means You where, at every moment of Your use,
|
|
74
|
+
ALL THREE of the following hold for Your Group:
|
|
75
|
+
(a) the total capital ever raised from investors — equity, convertible
|
|
76
|
+
instruments, SAFEs, venture debt, and investment grants, across
|
|
77
|
+
the whole lifetime of Your Group — is less than
|
|
78
|
+
USD 250,000; AND
|
|
79
|
+
(b) the most recent valuation of Your Group — whether set by a
|
|
80
|
+
financing round, a formal appraisal, or an acquisition offer that
|
|
81
|
+
was accepted — is less than USD 250,000; AND
|
|
82
|
+
(c) the gross revenue of Your Group, taken over its most recently
|
|
83
|
+
completed fiscal year or over the trailing twelve months,
|
|
84
|
+
whichever of the two is greater, is less than USD 1,000,000.
|
|
85
|
+
Gross revenue means all revenue before costs, from every source, across
|
|
86
|
+
Your Group as a whole — not the revenue of the part that uses the
|
|
87
|
+
Packages.
|
|
88
|
+
An individual using the Packages outside of any organization is always a
|
|
89
|
+
Qualifying Small Entity. An entity that has never raised capital and has
|
|
90
|
+
never been valued satisfies (a) and (b); (c) still applies to it.
|
|
91
|
+
An entity for which capitalization is not a meaningful measure —
|
|
92
|
+
including a government body, a public agency, or a state-funded
|
|
93
|
+
institution — is NOT a Qualifying Small Entity regardless of the above.
|
|
94
|
+
Amounts in other currencies convert to USD at the rate in effect on the
|
|
95
|
+
date of the round, appraisal, offer, or the close of the revenue period.
|
|
96
|
+
1.7. "Package Source" means the human-readable source of the Packages under
|
|
97
|
+
`js/` in the Licensor's repository, together with their build scripts,
|
|
98
|
+
configuration, tests, and fixtures. The Package Source is not an
|
|
99
|
+
Official Distribution and is not itself a Package — Sections 2.4 and
|
|
100
|
+
2.5 say what may be done with it. The repository's root LICENSE
|
|
101
|
+
excludes it by definition, so this License is the only one that governs
|
|
102
|
+
it.
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
2. PERMISSION
|
|
106
|
+
|
|
107
|
+
Subject to Your continuous compliance with this License, the Licensor grants
|
|
108
|
+
You a non-exclusive, non-transferable, non-sublicensable, revocable
|
|
109
|
+
permission to:
|
|
110
|
+
|
|
111
|
+
2.1. Install unmodified Packages from an Official Distribution, including
|
|
112
|
+
when a package manager installs them as a dependency of another Package;
|
|
113
|
+
2.2. Run them for Your own private, personal, non-commercial purposes; and
|
|
114
|
+
2.3. Run them for Commercial Use, but ONLY for as long as You are a
|
|
115
|
+
Qualifying Small Entity;
|
|
116
|
+
2.4. View and read the Package Source, for reference and evaluation; and
|
|
117
|
+
2.5. Build the Package Source and run what You build, on a computer You
|
|
118
|
+
control, solely to evaluate, review, or verify it.
|
|
119
|
+
|
|
120
|
+
Section 2.3 is the whole of the commercial permission. If Your Group is not a
|
|
121
|
+
Qualifying Small Entity, Commercial Use requires a separate commercial
|
|
122
|
+
license from the Licensor — see Section 6.
|
|
123
|
+
|
|
124
|
+
Sections 2.4 and 2.5 exist because the Package Source is TypeScript, where
|
|
125
|
+
reading and running are not cleanly separable. Checking that a file does what
|
|
126
|
+
it appears to do means running it — `npm install`, `npm test`, `node` — and a
|
|
127
|
+
permission to read that forbade the only way to verify what was read would be
|
|
128
|
+
a permission to take the Licensor's word for it. That is not the intent, so:
|
|
129
|
+
|
|
130
|
+
2.5.1. What You build under Section 2.5 may be used only to evaluate,
|
|
131
|
+
review, or verify the Package Source. Running it to do the job the
|
|
132
|
+
Packages do is not evaluation — for that, install an Official
|
|
133
|
+
Distribution under Sections 2.1 to 2.3, which is what the commercial
|
|
134
|
+
grant covers.
|
|
135
|
+
2.5.2. It may not be distributed, published, republished, shared, or
|
|
136
|
+
otherwise made available to anyone outside Your Group, in source or
|
|
137
|
+
built form.
|
|
138
|
+
2.5.3. Changes strictly necessary to make the Package Source build or run
|
|
139
|
+
for evaluation — dependency pinning, local paths, and the like — are
|
|
140
|
+
permitted for that purpose only, and Section 3.2 does not prohibit
|
|
141
|
+
them. Every other change is still prohibited.
|
|
142
|
+
2.5.4. Sections 9 through 14 apply to anything You build under Section 2.5
|
|
143
|
+
exactly as they apply to a Package.
|
|
144
|
+
|
|
145
|
+
No rights or licenses are granted by implication, estoppel, or otherwise. All
|
|
146
|
+
rights not expressly granted in this Section 2 are reserved by the Licensor.
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
3. RESTRICTIONS
|
|
150
|
+
|
|
151
|
+
Except as expressly permitted in Section 2, You may NOT, in whole or in part:
|
|
152
|
+
|
|
153
|
+
3.1. Exceed the grant — make any Commercial Use of the Packages when Your
|
|
154
|
+
Group is not a Qualifying Small Entity.
|
|
155
|
+
3.2. No modification — modify, adapt, translate, refactor, or otherwise
|
|
156
|
+
change any of the Packages, or create derivative works based on them.
|
|
157
|
+
3.3. No redistribution — copy, redistribute, republish, mirror publicly,
|
|
158
|
+
sublicense, sell, rent, lease, lend, share, or otherwise make available
|
|
159
|
+
any of the Packages, or any copy or fork of them, to any third party.
|
|
160
|
+
For the avoidance of doubt, Section 4 permits the copying a package
|
|
161
|
+
manager performs on Your behalf.
|
|
162
|
+
3.4. No embedding — incorporate, bundle, vendor, link, or otherwise combine
|
|
163
|
+
the Packages into any product, service, application, library, or work
|
|
164
|
+
that You distribute or make available to a third party, whether or not
|
|
165
|
+
for a fee.
|
|
166
|
+
3.5. No reverse engineering — reverse engineer, decompile, or disassemble the
|
|
167
|
+
Packages, except and only to the extent that this restriction is
|
|
168
|
+
expressly prohibited by applicable law.
|
|
169
|
+
3.6. No removal of notices — remove, obscure, or alter any copyright,
|
|
170
|
+
trademark, license, authorship, or other proprietary notice in or on any
|
|
171
|
+
of the Packages.
|
|
172
|
+
3.7. No circumvention — use the Packages in any manner not expressly
|
|
173
|
+
permitted by Section 2.
|
|
174
|
+
3.8. Package Source — use the Package Source for anything beyond Sections
|
|
175
|
+
2.4 and 2.5, including running it operationally or commercially in
|
|
176
|
+
place of an Official Distribution, copying or reusing any portion of it
|
|
177
|
+
in other software, or making it available to anyone outside Your Group.
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
4. WHAT NORMAL INSTALLATION IS ALLOWED TO DO
|
|
181
|
+
|
|
182
|
+
Section 3.3 does not prohibit, and this Section expressly permits, the
|
|
183
|
+
copying that installing software ordinarily involves, provided the copies
|
|
184
|
+
stay inside Your Group and serve only Your own permitted use:
|
|
185
|
+
|
|
186
|
+
4.1. Package manager caches, lockfiles, and integrity records.
|
|
187
|
+
4.2. A private registry proxy, mirror, or artifact repository operated by
|
|
188
|
+
Your Group for Your Group.
|
|
189
|
+
4.3. Container images and deployment artifacts You build for Your Group's own
|
|
190
|
+
infrastructure, and the copies a build or CI system makes to produce
|
|
191
|
+
them.
|
|
192
|
+
|
|
193
|
+
None of the above may be made available to anyone outside Your Group.
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
5. TERM AND CHANGE OF STATUS
|
|
197
|
+
|
|
198
|
+
Your status under Section 1.6 is tested continuously, not once. If Your Group
|
|
199
|
+
ceases to be a Qualifying Small Entity, the permission in Section 2.3 ends,
|
|
200
|
+
and You must either stop all Commercial Use of the Packages or obtain a
|
|
201
|
+
commercial license from the Licensor within 30 days of the change. Sections
|
|
202
|
+
2.1 and 2.2 are unaffected.
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
6. COMMERCIAL LICENSES
|
|
206
|
+
|
|
207
|
+
If Your Group is not a Qualifying Small Entity and You want to use the
|
|
208
|
+
Packages commercially, contact the Licensor at siarhei@dudko.dev to purchase
|
|
209
|
+
a commercial license. The same applies to anything else this License does not
|
|
210
|
+
grant — modification, redistribution, embedding in a product You ship, or use
|
|
211
|
+
by a public body.
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
7. RESERVATION OF RIGHTS
|
|
215
|
+
|
|
216
|
+
The Packages are licensed, not sold. The Licensor retains all right, title,
|
|
217
|
+
and interest in and to them, including all intellectual property rights.
|
|
218
|
+
Publication to a public registry is a distribution channel the Licensor has
|
|
219
|
+
designated for the purposes of Section 1.2 and does not constitute a grant of
|
|
220
|
+
any right beyond Section 2.
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
8. THIRD-PARTY COMPONENTS AND SERVICES
|
|
224
|
+
|
|
225
|
+
8.1. The Packages depend on third-party components, which remain subject to
|
|
226
|
+
their own licenses. Where such a license conflicts with this License,
|
|
227
|
+
that component's license governs that component only.
|
|
228
|
+
8.2. The Packages connect to services You configure — Your own APIs, Your git
|
|
229
|
+
hosting provider, Your workspace repository. Your use of any third-party
|
|
230
|
+
service is governed solely by that service's own terms, and You are
|
|
231
|
+
solely responsible for any fees, accounts, credentials, and compliance
|
|
232
|
+
obligations arising from it.
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
9. WHO IS PROTECTED BY SECTIONS 9 THROUGH 14
|
|
236
|
+
|
|
237
|
+
Every disclaimer, exclusion, limitation, and indemnity in Sections 9 through
|
|
238
|
+
14 is given for the benefit of, and is enforceable by, the Licensor and
|
|
239
|
+
equally by the Licensor's employees, contractors, agents, contributors,
|
|
240
|
+
successors, and assigns — the "Protected Parties". References to the Licensor
|
|
241
|
+
in those Sections mean all of them.
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
10. NO WARRANTY
|
|
245
|
+
|
|
246
|
+
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE PACKAGES ARE PROVIDED
|
|
247
|
+
"AS IS", "AS AVAILABLE", AND "WITH ALL FAULTS", WITHOUT WARRANTY, CONDITION,
|
|
248
|
+
REPRESENTATION, GUARANTEE, OR UNDERTAKING OF ANY KIND. THE LICENSOR EXPRESSLY
|
|
249
|
+
DISCLAIMS ALL WARRANTIES AND CONDITIONS, WHETHER EXPRESS, IMPLIED, STATUTORY,
|
|
250
|
+
COLLATERAL, OR ARISING FROM COURSE OF DEALING, COURSE OF PERFORMANCE, USAGE
|
|
251
|
+
OF TRADE, OR OTHERWISE, INCLUDING ANY IMPLIED WARRANTIES OR CONDITIONS OF
|
|
252
|
+
MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE,
|
|
253
|
+
DURABILITY, TITLE, ACCURACY, QUIET ENJOYMENT, SYSTEM INTEGRATION, AND
|
|
254
|
+
NON-INFRINGEMENT.
|
|
255
|
+
|
|
256
|
+
WITHOUT LIMITING THE FOREGOING, THE LICENSOR DOES NOT WARRANT, AND MAKES NO
|
|
257
|
+
REPRESENTATION WHATSOEVER, THAT:
|
|
258
|
+
|
|
259
|
+
10.1. THE PACKAGES WILL FUNCTION UNINTERRUPTED, TIMELY, SECURELY, OR
|
|
260
|
+
ERROR-FREE, OR THAT ANY DEFECT WILL BE CORRECTED;
|
|
261
|
+
10.2. ANY REQUEST WILL BE SENT, WILL BE SENT ONCE, WILL BE SENT AT THE
|
|
262
|
+
INTENDED TIME OR IN THE INTENDED TIME ZONE, WILL REACH ITS DESTINATION,
|
|
263
|
+
OR WILL CARRY THE INTENDED METHOD, URL, HEADERS, CREDENTIALS, OR BODY;
|
|
264
|
+
10.3. ANY SCHEDULE WILL FIRE, WILL FIRE ONLY ONCE, WILL NOT FIRE WHEN
|
|
265
|
+
DISABLED, OR WILL NOT BE MISSED;
|
|
266
|
+
10.4. ANY RESPONSE, TEST RESULT, RUN RECORD, OR REPORTED STATUS IS ACCURATE
|
|
267
|
+
OR COMPLETE;
|
|
268
|
+
10.5. ANY FILE THE PACKAGES READ, WRITE, MOVE, OR DELETE WILL BE PRESERVED,
|
|
269
|
+
VALID, OR RECOVERABLE, OR THAT ANY REPOSITORY OPERATION WILL LEAVE A
|
|
270
|
+
REPOSITORY IN A USABLE STATE;
|
|
271
|
+
10.6. ANY SCRIPT SANDBOX, PATH CHECK, REDACTION, MASKING, TRUNCATION, OR
|
|
272
|
+
OTHER PROTECTIVE MEASURE IS EFFECTIVE, COMPLETE, OR FREE OF BYPASS, OR
|
|
273
|
+
THAT A SECRET, TOKEN, COOKIE, OR OTHER CREDENTIAL WILL NOT BE LOGGED,
|
|
274
|
+
TRANSMITTED, PERSISTED, OR DISCLOSED;
|
|
275
|
+
10.7. THE PACKAGES ARE FREE OF VULNERABILITIES, MALICIOUS CODE, OR HARMFUL
|
|
276
|
+
COMPONENTS, INCLUDING ANY INTRODUCED THROUGH A DEPENDENCY, A REGISTRY,
|
|
277
|
+
A MIRROR, OR A BUILD SYSTEM; OR
|
|
278
|
+
10.8. THE PACKAGES ARE SUITABLE FOR, OR WILL SATISFY ANY LEGAL, REGULATORY,
|
|
279
|
+
CERTIFICATION, AUDIT, RETENTION, OR PRIVACY REQUIREMENT APPLICABLE TO,
|
|
280
|
+
YOUR USE.
|
|
281
|
+
|
|
282
|
+
YOU USE THE PACKAGES ENTIRELY AT YOUR OWN RISK.
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
11. LIMITATION OF LIABILITY
|
|
286
|
+
|
|
287
|
+
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL THE
|
|
288
|
+
LICENSOR BE LIABLE FOR ANY DAMAGE, LOSS, COST, EXPENSE, FINE, PENALTY, OR
|
|
289
|
+
LIABILITY OF ANY KIND ARISING OUT OF OR IN ANY WAY RELATED TO THE PACKAGES,
|
|
290
|
+
THEIR USE, THEIR UNAVAILABILITY, OR THIS LICENSE, INCLUDING DIRECT, INDIRECT,
|
|
291
|
+
INCIDENTAL, SPECIAL, CONSEQUENTIAL, EXEMPLARY, PUNITIVE, AGGRAVATED, AND
|
|
292
|
+
STATUTORY DAMAGES, AND INCLUDING:
|
|
293
|
+
|
|
294
|
+
11.1. LOSS OF PROFITS, REVENUE, BUSINESS, CONTRACTS, OPPORTUNITY, GOODWILL,
|
|
295
|
+
REPUTATION, OR ANTICIPATED SAVINGS;
|
|
296
|
+
11.2. LOSS, CORRUPTION, DELETION, OVERWRITING, OR UNRECOVERABILITY OF DATA,
|
|
297
|
+
FILES, WORKSPACES, REPOSITORIES, COMMITS, OR HISTORY;
|
|
298
|
+
11.3. BUSINESS INTERRUPTION, DOWNTIME, OR COST OF SUBSTITUTE GOODS OR
|
|
299
|
+
SERVICES;
|
|
300
|
+
11.4. UNINTENDED, DUPLICATED, MISTIMED, MALFORMED, OR UNAUTHORIZED NETWORK
|
|
301
|
+
REQUESTS, AND ANYTHING THEY CAUSE AT THEIR DESTINATION, INCLUDING DATA
|
|
302
|
+
CREATED, MODIFIED, OR DESTROYED, ORDERS PLACED, PAYMENTS MADE,
|
|
303
|
+
MESSAGES SENT, RATE LIMITS BREACHED, ACCOUNTS SUSPENDED, AND
|
|
304
|
+
METERED-USAGE, EGRESS, OR OVERAGE CHARGES;
|
|
305
|
+
11.5. LOSS, EXPOSURE, LOGGING, OR MISUSE OF ANY CREDENTIAL, SECRET, TOKEN,
|
|
306
|
+
COOKIE, OR PERSONAL DATA, AND ANY RESULTING BREACH NOTIFICATION,
|
|
307
|
+
REGULATORY, OR REMEDIATION COST;
|
|
308
|
+
11.6. THE ACTS OR OMISSIONS OF ANY AI AGENT, AUTOMATION, SCRIPT, OR THIRD
|
|
309
|
+
PARTY THAT DRIVES OR IS DRIVEN BY THE PACKAGES; OR
|
|
310
|
+
11.7. ANY SECURITY INCIDENT, INCLUDING ONE ORIGINATING IN A DEPENDENCY, A
|
|
311
|
+
PACKAGE REGISTRY, A CONTAINER REGISTRY, OR A COMPROMISED BUILD OR
|
|
312
|
+
DISTRIBUTION CHANNEL;
|
|
313
|
+
|
|
314
|
+
WHETHER BASED ON CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY,
|
|
315
|
+
BREACH OF STATUTORY DUTY, MISREPRESENTATION, OR ANY OTHER THEORY, WHETHER OR
|
|
316
|
+
NOT SUCH DAMAGE WAS FORESEEABLE, WHETHER OR NOT THE LICENSOR HAS BEEN ADVISED
|
|
317
|
+
OF THE POSSIBILITY OF IT, AND EVEN IF ANY REMEDY FAILS OF ITS ESSENTIAL
|
|
318
|
+
PURPOSE.
|
|
319
|
+
|
|
320
|
+
TO THE EXTENT ANY LIABILITY CANNOT BE FULLY EXCLUDED, THE LICENSOR'S TOTAL
|
|
321
|
+
AGGREGATE LIABILITY FOR ALL CLAIMS, IN THE AGGREGATE AND NOT PER CLAIM, WILL
|
|
322
|
+
NOT EXCEED THE GREATER OF (a) THE TOTAL AMOUNT YOU ACTUALLY PAID THE LICENSOR
|
|
323
|
+
FOR THE PACKAGES IN THE TWELVE MONTHS BEFORE THE EVENT GIVING RISE TO THE
|
|
324
|
+
CLAIM — WHICH, FOR EVERY QUALIFYING SMALL ENTITY AND EVERY NON-COMMERCIAL
|
|
325
|
+
USER, IS ZERO — AND (b) USD 100.
|
|
326
|
+
|
|
327
|
+
ANY CLAIM ARISING OUT OF OR RELATED TO THE PACKAGES OR THIS LICENSE MUST BE
|
|
328
|
+
BROUGHT WITHIN TWELVE MONTHS AFTER THE CAUSE OF ACTION FIRST ACCRUES, OR IT
|
|
329
|
+
IS PERMANENTLY BARRED, TO THE EXTENT APPLICABLE LAW ALLOWS SUCH A PERIOD TO
|
|
330
|
+
BE AGREED.
|
|
331
|
+
|
|
332
|
+
THE PACKAGES ARE SUPPLIED AT NO CHARGE TO QUALIFYING SMALL ENTITIES AND
|
|
333
|
+
NON-COMMERCIAL USERS. THE ALLOCATION OF RISK IN SECTIONS 9 THROUGH 14 IS AN
|
|
334
|
+
ESSENTIAL BASIS OF THE BARGAIN AND OF THE PRICE, AND THE LICENSOR WOULD NOT
|
|
335
|
+
MAKE THE PACKAGES AVAILABLE WITHOUT IT.
|
|
336
|
+
|
|
337
|
+
NOTHING IN THIS LICENSE EXCLUDES OR LIMITS LIABILITY THAT CANNOT LAWFULLY BE
|
|
338
|
+
EXCLUDED OR LIMITED, INCLUDING, WHERE APPLICABLE, LIABILITY FOR DEATH OR
|
|
339
|
+
PERSONAL INJURY CAUSED BY NEGLIGENCE OR FOR FRAUD. SOME JURISDICTIONS DO NOT
|
|
340
|
+
ALLOW CERTAIN EXCLUSIONS OR LIMITATIONS, SO SOME OF THE ABOVE MAY NOT APPLY
|
|
341
|
+
TO YOU; IN THAT CASE THE LICENSOR'S LIABILITY IS LIMITED TO THE MINIMUM
|
|
342
|
+
EXTENT PERMITTED BY APPLICABLE LAW, AND THE REST OF THIS SECTION CONTINUES TO
|
|
343
|
+
APPLY.
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
12. YOUR SOLE RESPONSIBILITY
|
|
347
|
+
|
|
348
|
+
The Packages send network requests that You configure, using credentials that
|
|
349
|
+
You provide, execute scripts that You or Your agents supply, edit files in a
|
|
350
|
+
repository that You own, and can run unattended on a schedule. Between You and
|
|
351
|
+
the Licensor, You alone are responsible for all of the following, and You
|
|
352
|
+
accept the whole risk of each:
|
|
353
|
+
|
|
354
|
+
12.1. Every request sent — its method, destination, headers, credentials,
|
|
355
|
+
body, timing, and frequency — and every effect it has at that
|
|
356
|
+
destination, whether or not the request was one You intended.
|
|
357
|
+
12.2. The endpoints You target, including production systems, systems
|
|
358
|
+
belonging to other people, and systems whose terms restrict automated
|
|
359
|
+
access. You are responsible for having the authority to send what You
|
|
360
|
+
send where You send it.
|
|
361
|
+
12.3. Every script You run, and everything an AI agent does through the MCP
|
|
362
|
+
server, including files it creates, moves, or deletes and requests it
|
|
363
|
+
fires. An agent acts on Your behalf; its output is Yours.
|
|
364
|
+
12.4. Every credential You configure, wherever You store it, and every
|
|
365
|
+
consequence of its exposure.
|
|
366
|
+
12.5. Backups. The Packages write to a repository You control and keep no
|
|
367
|
+
copy of what they replace. Keeping recoverable backups and reviewing
|
|
368
|
+
changes before they are committed or pushed is Yours alone.
|
|
369
|
+
12.6. Your compliance with all applicable law and third-party terms,
|
|
370
|
+
including data-protection, export-control, and sanctions law, and any
|
|
371
|
+
approval, audit, retention, or certification obligation of Yours.
|
|
372
|
+
12.7. Deciding whether the Packages are fit for Your purpose. They are not
|
|
373
|
+
designed, tested, or offered for use in safety-critical, life-critical,
|
|
374
|
+
medical, aviation, nuclear, emergency-response, or comparable
|
|
375
|
+
environments, or anywhere failure or a mistimed request could cause
|
|
376
|
+
death, personal injury, or severe physical, environmental, or financial
|
|
377
|
+
harm. Any such use is at Your sole risk and is outside the permission
|
|
378
|
+
in Section 2.
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
13. INDEMNIFICATION
|
|
382
|
+
|
|
383
|
+
You will defend, indemnify, and hold harmless the Licensor from and against
|
|
384
|
+
every claim, demand, action, proceeding, investigation, loss, damage,
|
|
385
|
+
liability, fine, penalty, settlement, cost, and expense — including reasonable
|
|
386
|
+
legal fees — brought by or owed to any third party and arising out of or
|
|
387
|
+
related to:
|
|
388
|
+
|
|
389
|
+
13.1. Your use of the Packages, or use by anyone acting through You or Your
|
|
390
|
+
credentials, including any AI agent or automation;
|
|
391
|
+
13.2. any request the Packages sent on Your behalf and its effects;
|
|
392
|
+
13.3. any content, script, workspace, credential, or personal data You
|
|
393
|
+
supplied to or processed with the Packages;
|
|
394
|
+
13.4. Your breach of this License, including any use beyond the permission in
|
|
395
|
+
Section 2; or
|
|
396
|
+
13.5. Your violation of any law or of any third party's rights or terms.
|
|
397
|
+
|
|
398
|
+
The Licensor may, at its own expense, assume the exclusive defense and control
|
|
399
|
+
of any matter otherwise subject to indemnification by You, in which case You
|
|
400
|
+
will cooperate. You will not settle any matter in a way that imposes any
|
|
401
|
+
obligation or admission on the Licensor without its prior written consent.
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
14. NO SUPPORT, NO AVAILABILITY, NO OBLIGATION TO MAINTAIN
|
|
405
|
+
|
|
406
|
+
14.1. The Licensor has no obligation to provide maintenance, updates,
|
|
407
|
+
upgrades, bug fixes, security patches, migration paths, backward
|
|
408
|
+
compatibility, or technical support of any kind, and no obligation to
|
|
409
|
+
respond to any report. Any such item, if provided, is part of the
|
|
410
|
+
Packages and subject to this License.
|
|
411
|
+
14.2. The Licensor may at any time and without notice or liability change,
|
|
412
|
+
deprecate, restrict, discontinue, unpublish, or withdraw any Package,
|
|
413
|
+
any version of it, or any distribution channel for it, and may cease
|
|
414
|
+
publishing entirely. Nothing here is a commitment that any Package will
|
|
415
|
+
remain available, installable, or supported. Section 4 exists so that
|
|
416
|
+
You can keep Your own copies; keeping them is Yours to do.
|
|
417
|
+
14.3. Registries, mirrors, and container registries are operated by third
|
|
418
|
+
parties. The Licensor is not responsible for their availability,
|
|
419
|
+
integrity, retention, or conduct.
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
15. TERMINATION
|
|
423
|
+
|
|
424
|
+
15.1. Breach. This License and the permissions in Section 2 terminate
|
|
425
|
+
automatically and immediately, without notice, if You breach any term.
|
|
426
|
+
15.2. Revocation without cause. The Licensor may also revoke the permissions
|
|
427
|
+
in Section 2 without cause. Such a revocation takes effect six (6)
|
|
428
|
+
months after the Licensor gives notice of it — to You, or by
|
|
429
|
+
publishing it in the repository, on the Packages' registry pages, or
|
|
430
|
+
on the project's website — and the permissions continue unchanged
|
|
431
|
+
until then. The six months are there so that a business that built on
|
|
432
|
+
the Packages has a migration window rather than an outage: You may
|
|
433
|
+
keep installing, running, and deploying the Packages throughout it,
|
|
434
|
+
including for Commercial Use if Section 2.3 applied to You when notice
|
|
435
|
+
was given.
|
|
436
|
+
15.3. What the wind-down is not. Section 15.2 gives You time; it does not
|
|
437
|
+
oblige the Licensor to publish, keep published, update, support, or
|
|
438
|
+
fix any Package during that time (Section 14). If a Package is
|
|
439
|
+
unpublished from a registry during the period, Section 4 is what lets
|
|
440
|
+
You keep and use Your own copies of it until the period ends.
|
|
441
|
+
15.4. Not a limit on termination for breach. Section 15.2 does not apply to
|
|
442
|
+
termination under Section 15.1, which is immediate.
|
|
443
|
+
15.5. On termination You must immediately stop all use of the Packages and
|
|
444
|
+
the Package Source and destroy all copies in Your possession or
|
|
445
|
+
control, including the copies described in Section 4. Sections 3 and 6
|
|
446
|
+
through 19 survive termination.
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
16. GOVERNING LAW
|
|
450
|
+
|
|
451
|
+
This License is governed by and construed under the laws of Georgia — the
|
|
452
|
+
country, whose official name is Georgia (Sakartvelo), and not the United
|
|
453
|
+
States state of the same name — without regard to its conflict-of-law
|
|
454
|
+
principles, and excluding the United Nations Convention on Contracts for the
|
|
455
|
+
International Sale of Goods.
|
|
456
|
+
|
|
457
|
+
This choice is fixed. It does not follow the Licensor's residence,
|
|
458
|
+
nationality, or place of business, and it does not change if any of those
|
|
459
|
+
change.
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
17. SEVERABILITY
|
|
463
|
+
|
|
464
|
+
If any provision of this License is held unenforceable, that provision will be
|
|
465
|
+
enforced to the maximum extent permissible and the remaining provisions will
|
|
466
|
+
remain in full force and effect. In particular, if any part of Sections 9
|
|
467
|
+
through 14 is held unenforceable, the remainder of those Sections continues to
|
|
468
|
+
apply with full force.
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
18. ENTIRE AGREEMENT; NO WAIVER
|
|
472
|
+
|
|
473
|
+
This License is the entire agreement between You and the Licensor regarding
|
|
474
|
+
the Packages and supersedes any prior understanding, representation, or
|
|
475
|
+
statement, including anything in the documentation, the README files, the
|
|
476
|
+
repository, or any public communication. You confirm that You have not relied
|
|
477
|
+
on any statement not set out in this License. No failure or delay by the
|
|
478
|
+
Licensor in exercising any right is a waiver of it.
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
19. CONTRIBUTIONS
|
|
482
|
+
|
|
483
|
+
19.1. "Contribution" means any code, documentation, test, translation,
|
|
484
|
+
configuration, asset, or other material You submit for inclusion in
|
|
485
|
+
the Packages or the Package Source — by pull request, patch, issue
|
|
486
|
+
attachment, email, or any other means, to the Licensor's repository or
|
|
487
|
+
to the Licensor directly. Submitting is voluntary and the Licensor is
|
|
488
|
+
under no obligation to review, accept, or use a Contribution.
|
|
489
|
+
19.2. Assignment. By submitting a Contribution You assign to the Licensor,
|
|
490
|
+
absolutely and irrevocably, all right, title, and interest in and to
|
|
491
|
+
it throughout the world, including all copyright, database, and other
|
|
492
|
+
intellectual property rights in it and all rights of action and
|
|
493
|
+
remedies for past infringement. The assignment takes effect on
|
|
494
|
+
submission, is not conditional on the Contribution being merged, and
|
|
495
|
+
is made without payment or any obligation to account.
|
|
496
|
+
19.3. Fallbacks. Where a right in Section 19.2 cannot be assigned under
|
|
497
|
+
applicable law, You instead grant the Licensor an exclusive,
|
|
498
|
+
worldwide, perpetual, irrevocable, royalty-free, fully paid-up license
|
|
499
|
+
to exercise it, with the right to sublicense through multiple tiers.
|
|
500
|
+
Where a right can be neither assigned nor exclusively licensed, You
|
|
501
|
+
waive it as against the Licensor and everyone claiming under the
|
|
502
|
+
Licensor, to the fullest extent the law allows — including any moral
|
|
503
|
+
right, any right of integrity, and any right to be identified as the
|
|
504
|
+
author — and You agree not to assert it. You will, at the Licensor's
|
|
505
|
+
request and expense, sign anything reasonably needed to give effect to
|
|
506
|
+
this Section.
|
|
507
|
+
19.4. Patents. You grant the Licensor and every recipient of the Packages a
|
|
508
|
+
perpetual, worldwide, non-exclusive, royalty-free, irrevocable license
|
|
509
|
+
under every patent claim You own or can license that is necessarily
|
|
510
|
+
infringed by the Contribution alone or by its combination with the
|
|
511
|
+
Packages, to make, have made, use, offer to sell, sell, import, and
|
|
512
|
+
otherwise transfer it.
|
|
513
|
+
19.5. Your assurances. You confirm that each Contribution is Your own
|
|
514
|
+
original work or that You otherwise hold the rights to submit it on
|
|
515
|
+
these terms; that it carries no third-party code, license condition,
|
|
516
|
+
employment agreement, or other obligation that conflicts with Section
|
|
517
|
+
19.2; and that where an employer or client holds rights in it, You
|
|
518
|
+
have their permission or they have waived those rights. If any of that
|
|
519
|
+
turns out not to be so, tell the Licensor as soon as You know.
|
|
520
|
+
19.6. What the Licensor may do with it. The Licensor may use, modify,
|
|
521
|
+
relicense, sublicense, publish, or decline to publish any Contribution
|
|
522
|
+
on any terms, including the terms of this License and of the
|
|
523
|
+
repository's root LICENSE, and is under no obligation to attribute it,
|
|
524
|
+
keep it, or keep it unchanged. Nothing in this Section gives You any
|
|
525
|
+
right in the Packages, makes You a Protected Party, or creates any
|
|
526
|
+
partnership, employment, or agency relationship.
|
|
527
|
+
19.7. As is. A Contribution is submitted without warranty of any kind by
|
|
528
|
+
You, save for the confirmations in Section 19.5.
|
|
529
|
+
19.8. When this applies. This Section governs every Contribution submitted
|
|
530
|
+
on or after the date it appears in the Licensor's repository. Rights
|
|
531
|
+
in anything submitted before that date are dealt with separately, by
|
|
532
|
+
agreement with its author. If You do not accept this Section, do not
|
|
533
|
+
submit a Contribution.
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
For permissions beyond the scope of this License — commercial use above the
|
|
537
|
+
thresholds in Section 1.6, modification, redistribution, or embedding the
|
|
538
|
+
Packages in something You ship — contact the Licensor at siarhei@dudko.dev.
|
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# baton-format
|
|
2
|
+
|
|
3
|
+
The workspace file format of [Baton](https://baton.dudko.dev), the git-native
|
|
4
|
+
API client: parsing, validation, and deterministic serialization for
|
|
5
|
+
`baton.yaml`, collections, folders, requests, environments, and schedules.
|
|
6
|
+
|
|
7
|
+
Deterministic is the point. Fixed key order, two-space indent, LF endings, and
|
|
8
|
+
stable quoting mean parse → serialize is idempotent, so a workspace edited by
|
|
9
|
+
the app, the worker, or an AI agent produces the same bytes and diffs stay
|
|
10
|
+
small enough to review in a pull request.
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { parseRequestFile, serializeRequestFile } from "@dudko.dev/baton-format";
|
|
14
|
+
|
|
15
|
+
const request = parseRequestFile(text);
|
|
16
|
+
request.name = "List users";
|
|
17
|
+
writeFileSync(path, serializeRequestFile(request));
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The same format is implemented a second time in Dart for the app, and both
|
|
21
|
+
implementations are pinned to byte-level conformance fixtures — a file written
|
|
22
|
+
by one is byte-identical to the same file written by the other.
|
|
23
|
+
|
|
24
|
+
Requires Node.js 24 or newer.
|
|
25
|
+
|
|
26
|
+
## License
|
|
27
|
+
|
|
28
|
+
Proprietary — see [LICENSE](LICENSE).
|
|
29
|
+
|
|
30
|
+
Free for personal, non-commercial use. **Commercial use is free for small
|
|
31
|
+
entities**: your group must have raised less than USD 250,000 in total, be
|
|
32
|
+
valued at less than USD 250,000, and have annual gross revenue under
|
|
33
|
+
USD 1,000,000. Above any of the three, commercial use needs a license — write
|
|
34
|
+
to <siarhei@dudko.dev>.
|
|
35
|
+
|
|
36
|
+
Redistribution is not permitted. Installing from npm, caching in your own
|
|
37
|
+
registry proxy, and building your own deployment images are (see Section 4 of
|
|
38
|
+
the license); republishing, forking, or bundling these packages into something
|
|
39
|
+
you ship are not.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type FormatErrorCode = "invalid-yaml" | "unsupported-format" | "missing-field" | "invalid-field" | "unknown-field";
|
|
2
|
+
/** A validation or parse failure, pointing at the offending field. */
|
|
3
|
+
export declare class FormatError extends Error {
|
|
4
|
+
readonly code: FormatErrorCode;
|
|
5
|
+
/** Dot path to the field, e.g. "body.graphql.query" or "query[1].name". */
|
|
6
|
+
readonly path: string;
|
|
7
|
+
constructor(code: FormatErrorCode, path: string, message: string);
|
|
8
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** A validation or parse failure, pointing at the offending field. */
|
|
2
|
+
export class FormatError extends Error {
|
|
3
|
+
code;
|
|
4
|
+
/** Dot path to the field, e.g. "body.graphql.query" or "query[1].name". */
|
|
5
|
+
path;
|
|
6
|
+
constructor(code, path, message) {
|
|
7
|
+
super(path === "" ? message : `${path}: ${message}`);
|
|
8
|
+
this.name = "FormatError";
|
|
9
|
+
this.code = code;
|
|
10
|
+
this.path = path;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from "./types.js";
|
|
2
|
+
export { FormatError, type FormatErrorCode } from "./errors.js";
|
|
3
|
+
export { parseRequestFile, parseCollectionFile, parseEnvironmentFile, parseWorkspaceManifest, parseSchedulesFile, } from "./parse.js";
|
|
4
|
+
export { serializeRequestFile, serializeCollectionFile, serializeEnvironmentFile, serializeWorkspaceManifest, serializeSchedulesFile, } from "./serialize.js";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from "./types.js";
|
|
2
|
+
export { FormatError } from "./errors.js";
|
|
3
|
+
export { parseRequestFile, parseCollectionFile, parseEnvironmentFile, parseWorkspaceManifest, parseSchedulesFile, } from "./parse.js";
|
|
4
|
+
export { serializeRequestFile, serializeCollectionFile, serializeEnvironmentFile, serializeWorkspaceManifest, serializeSchedulesFile, } from "./serialize.js";
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CollectionFile, EnvironmentFile, RequestFile, SchedulesFile, WorkspaceManifest } from "./types.js";
|
|
2
|
+
/** Parse and validate a `*.req.yaml` file into its normalized form. */
|
|
3
|
+
export declare function parseRequestFile(text: string): RequestFile;
|
|
4
|
+
/** Parse and validate a `collection.yaml` / `folder.yaml` file. */
|
|
5
|
+
export declare function parseCollectionFile(text: string): CollectionFile;
|
|
6
|
+
/** Parse and validate a `*.env.yaml` file. */
|
|
7
|
+
export declare function parseEnvironmentFile(text: string): EnvironmentFile;
|
|
8
|
+
/** Parse and validate the `baton.yaml` workspace manifest. */
|
|
9
|
+
export declare function parseWorkspaceManifest(text: string): WorkspaceManifest;
|
|
10
|
+
/** Parse and validate a `schedules.yaml` file. */
|
|
11
|
+
export declare function parseSchedulesFile(text: string): SchedulesFile;
|