pf2e-mcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pf2e_mcp-0.1.0/LICENSE +193 -0
- pf2e_mcp-0.1.0/LICENSES/OFL-1.1.txt +100 -0
- pf2e_mcp-0.1.0/NOTICE.md +336 -0
- pf2e_mcp-0.1.0/PKG-INFO +554 -0
- pf2e_mcp-0.1.0/README.md +526 -0
- pf2e_mcp-0.1.0/pyproject.toml +50 -0
- pf2e_mcp-0.1.0/pyproject.toml.orig +46 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/__init__.py +4 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/ingestion/__init__.py +0 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/ingestion/build.py +920 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/ingestion/prerequisite_overrides.json +37 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/ingestion/prerequisites.py +220 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/ingestion/schema.sql +322 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/ingestion/source.py +123 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/paths.py +52 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/server/__init__.py +0 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/server/app.py +53 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/server/build_tools.py +1585 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/server/db.py +23 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/server/licensing.py +63 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/server/pf2e_math.py +306 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/server/pfs.py +65 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/server/pfs_overrides.json +4 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/server/rules_tools.py +395 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/server/sheet.py +2865 -0
- pf2e_mcp-0.1.0/src/pf2e_mcp/server/sheet_assets.py +620 -0
pf2e_mcp-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
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
|
|
44
|
+
purposes of this License, Derivative Works shall not include works
|
|
45
|
+
that remain separable from, or merely link (or bind by name) to the
|
|
46
|
+
interfaces of, the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including the
|
|
49
|
+
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
|
|
52
|
+
owner or by an individual or Legal Entity authorized to submit on
|
|
53
|
+
behalf of the copyright owner. For the purposes of this definition,
|
|
54
|
+
"submitted" means any form of electronic, verbal, or written
|
|
55
|
+
communication sent to the Licensor or its representatives, including
|
|
56
|
+
but not limited to communication on electronic mailing lists, source
|
|
57
|
+
code control systems, and issue tracking systems that are managed by,
|
|
58
|
+
or on behalf of, the Licensor for the purpose of discussing and
|
|
59
|
+
improving the Work, but excluding communication that is conspicuously
|
|
60
|
+
marked or otherwise designated in writing by the copyright owner as
|
|
61
|
+
"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
|
|
78
|
+
made, use, offer to sell, sell, import, and otherwise transfer the
|
|
79
|
+
Work, where such license applies only to those patent claims
|
|
80
|
+
licensable by such Contributor that are necessarily infringed by
|
|
81
|
+
their Contribution(s) alone or by combination of their
|
|
82
|
+
Contribution(s) with the Work to which such Contribution(s) was
|
|
83
|
+
submitted. If You institute patent litigation against any entity
|
|
84
|
+
(including a cross-claim or counterclaim in a lawsuit) alleging
|
|
85
|
+
that the Work or a Contribution incorporated within the Work
|
|
86
|
+
constitutes direct or contributory patent infringement, then any
|
|
87
|
+
patent licenses granted to You under this License for that Work
|
|
88
|
+
shall terminate 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
|
|
142
|
+
the origin of the Work and reproducing the content of the NOTICE
|
|
143
|
+
file.
|
|
144
|
+
|
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
149
|
+
implied, including, without limitation, any warranties or conditions
|
|
150
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
151
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
|
153
|
+
risks associated with Your exercise of permissions under this
|
|
154
|
+
License.
|
|
155
|
+
|
|
156
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
157
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
158
|
+
unless required by applicable law (such as deliberate and grossly
|
|
159
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
160
|
+
liable to You for damages, including any direct, indirect, special,
|
|
161
|
+
incidental, or consequential damages of any character arising as a
|
|
162
|
+
result of this License or out of the use or inability to use the
|
|
163
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
164
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
165
|
+
other commercial damages or losses), even if such Contributor
|
|
166
|
+
has been advised of the possibility of such damages.
|
|
167
|
+
|
|
168
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
169
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
170
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
171
|
+
or other liability obligations and/or rights consistent with this
|
|
172
|
+
License. However, in accepting such obligations, You may act only
|
|
173
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
174
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
175
|
+
defend, and hold each Contributor harmless for any liability
|
|
176
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
177
|
+
of your accepting any such warranty or additional liability.
|
|
178
|
+
|
|
179
|
+
END OF TERMS AND CONDITIONS
|
|
180
|
+
|
|
181
|
+
Copyright 2026 Rob Jenks
|
|
182
|
+
|
|
183
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
184
|
+
you may not use this file except in compliance with the License.
|
|
185
|
+
You may obtain a copy of the License at
|
|
186
|
+
|
|
187
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
188
|
+
|
|
189
|
+
Unless required by applicable law or agreed to in writing, software
|
|
190
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
191
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
192
|
+
See the License for the specific language governing permissions and
|
|
193
|
+
limitations under the License.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
Copyright 2022 The Noto Project Authors
|
|
2
|
+
(https://github.com/notofonts/latin-greek-cyrillic)
|
|
3
|
+
|
|
4
|
+
This copyright notice covers the three subsetted font files vendored in
|
|
5
|
+
`src/pf2e_mcp/server/sheet_assets.py` -- Noto Serif, Noto Serif Italic, and
|
|
6
|
+
Noto Sans -- and is reproduced verbatim from name ID 0 of the upstream font
|
|
7
|
+
binaries. No Reserved Font Name is declared by these families, so the
|
|
8
|
+
subsets retain their original names (see NOTICE.md, "Vendored fonts").
|
|
9
|
+
|
|
10
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
11
|
+
This license is copied below, and is also available with a FAQ at:
|
|
12
|
+
https://openfontlicense.org
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
-----------------------------------------------------------
|
|
16
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
17
|
+
-----------------------------------------------------------
|
|
18
|
+
|
|
19
|
+
PREAMBLE
|
|
20
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
21
|
+
development of collaborative font projects, to support the font creation
|
|
22
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
23
|
+
open framework in which fonts may be shared and improved in partnership
|
|
24
|
+
with others.
|
|
25
|
+
|
|
26
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
27
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
28
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
29
|
+
redistributed and/or sold with any software provided that any reserved
|
|
30
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
31
|
+
however, cannot be released under any other type of license. The
|
|
32
|
+
requirement for fonts to remain under this license does not apply
|
|
33
|
+
to any document created using the fonts or their derivatives.
|
|
34
|
+
|
|
35
|
+
DEFINITIONS
|
|
36
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
37
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
38
|
+
include source files, build scripts and documentation.
|
|
39
|
+
|
|
40
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
41
|
+
copyright statement(s).
|
|
42
|
+
|
|
43
|
+
"Original Version" refers to the collection of Font Software components as
|
|
44
|
+
distributed by the Copyright Holder(s).
|
|
45
|
+
|
|
46
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
47
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
48
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
49
|
+
new environment.
|
|
50
|
+
|
|
51
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
52
|
+
writer or other person who contributed to the Font Software.
|
|
53
|
+
|
|
54
|
+
PERMISSION & CONDITIONS
|
|
55
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
56
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
57
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
58
|
+
Software, subject to the following conditions:
|
|
59
|
+
|
|
60
|
+
1) Neither the Font Software nor any of its individual components,
|
|
61
|
+
in Original or Modified Versions, may be sold by itself.
|
|
62
|
+
|
|
63
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
64
|
+
redistributed and/or sold with any software, provided that each copy
|
|
65
|
+
contains the above copyright notice and this license. These can be
|
|
66
|
+
included either as stand-alone text files, human-readable headers or
|
|
67
|
+
in the appropriate machine-readable metadata fields within text or
|
|
68
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
69
|
+
|
|
70
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
71
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
72
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
73
|
+
presented to the users.
|
|
74
|
+
|
|
75
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
76
|
+
Software shall not be used to promote, endorse or advertise any
|
|
77
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
78
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
79
|
+
permission.
|
|
80
|
+
|
|
81
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
82
|
+
must be distributed entirely under this license, and must not be
|
|
83
|
+
distributed under any other license. The requirement for fonts to
|
|
84
|
+
remain under this license does not apply to any document created
|
|
85
|
+
using the Font Software.
|
|
86
|
+
|
|
87
|
+
TERMINATION
|
|
88
|
+
This license becomes null and void if any of the above conditions are
|
|
89
|
+
not met.
|
|
90
|
+
|
|
91
|
+
DISCLAIMER
|
|
92
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
93
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
94
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
95
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
96
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
97
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
98
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
99
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
100
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
pf2e_mcp-0.1.0/NOTICE.md
ADDED
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
# Notice
|
|
2
|
+
|
|
3
|
+
This file covers licensing for third-party content this project *uses* but
|
|
4
|
+
does not itself distribute, as distinct from `LICENSE` (Apache 2.0), which
|
|
5
|
+
covers this project's own original source code.
|
|
6
|
+
|
|
7
|
+
## What's in this repository
|
|
8
|
+
|
|
9
|
+
Everything in `src/`, `scripts/`, and the project's documentation is
|
|
10
|
+
original code and writing. This repository stores **no Pathfinder 2nd
|
|
11
|
+
Edition game database, no rules text or descriptive prose, no stat blocks,
|
|
12
|
+
and no artwork** -- none of the ingested content is vendored here, and none
|
|
13
|
+
ever has been (`git log` has only ever carried source files). The game data
|
|
14
|
+
this project serves is downloaded on the end user's own machine at build
|
|
15
|
+
time; see "What this project downloads at build/run time" below.
|
|
16
|
+
|
|
17
|
+
What the repository *does* contain, which the above should not be read to
|
|
18
|
+
deny:
|
|
19
|
+
|
|
20
|
+
- **Pathfinder game terminology and proper nouns used as identifiers.**
|
|
21
|
+
Skill names, proficiency ranks, ability scores, magical traditions, and
|
|
22
|
+
the names of specific classes, class features, subclasses, feats, and
|
|
23
|
+
spells appear throughout the source as dictionary keys, lookup values,
|
|
24
|
+
enum members, and match targets -- for example the skill list and
|
|
25
|
+
`{"trained": 2, "expert": 4, ...}` bonus table in
|
|
26
|
+
`server/pf2e_math.py`, and the class-feature and hybrid-study names in
|
|
27
|
+
`ingestion/prerequisite_overrides.json`. A handful of Golarion proper
|
|
28
|
+
nouns (deity names) appear in docstrings purely as filename examples for
|
|
29
|
+
the character sheet's symbol lookup.
|
|
30
|
+
- **Short verbatim prerequisite phrases used as exact-match keys.**
|
|
31
|
+
`ingestion/prerequisite_overrides.json` keys its hand-curated entries on
|
|
32
|
+
the prerequisite string exactly as it appears in the source data (e.g.
|
|
33
|
+
`"class granting no more Hit Points per level than 10 + your
|
|
34
|
+
Constitution modifier"`), because an inexact key would silently stop
|
|
35
|
+
matching after errata. These are a few dozen short mechanical clauses,
|
|
36
|
+
not rules text carried for its own sake.
|
|
37
|
+
- **Rules facts embedded in the algorithms.** Numbers like the ability
|
|
38
|
+
boost levels `(5, 10, 15, 20)`, the minimum character level for each
|
|
39
|
+
skill proficiency rank, and the derived-statistic formulas in
|
|
40
|
+
`server/pf2e_math.py` and `server/build_tools.py` are game rules
|
|
41
|
+
expressed as code. They are what makes this software do anything.
|
|
42
|
+
- **Documentation that discusses specific rules by name.** `README.md`,
|
|
43
|
+
`KNOWN_ISSUES.md`, `AGENTS.md`, and the character-builder skill describe
|
|
44
|
+
behaviour and known gaps in terms of the actual feats, spells, classes,
|
|
45
|
+
and prerequisites involved, because a gap cannot be usefully documented
|
|
46
|
+
in the abstract.
|
|
47
|
+
- **The full text of the Open Game License 1.0a**, reproduced below and
|
|
48
|
+
again in `server/sheet.py` so that rendered character sheets carry it.
|
|
49
|
+
Reproducing it is a requirement of the license, not incidental use.
|
|
50
|
+
- **Three subsetted, OFL-licensed Noto font files**, base64-encoded in
|
|
51
|
+
`src/pf2e_mcp/server/sheet_assets.py`, with the SIL Open Font License 1.1
|
|
52
|
+
reproduced in full at `LICENSES/OFL-1.1.txt` as that license requires (see
|
|
53
|
+
"Vendored fonts" below). These are the only third-party binary assets in
|
|
54
|
+
the repository, and they are not Paizo's.
|
|
55
|
+
|
|
56
|
+
The distinction being drawn is between *bulk content* -- the rules text,
|
|
57
|
+
descriptions, and narrative material that the licenses govern, which is
|
|
58
|
+
never stored here -- and *references to the game's mechanics and
|
|
59
|
+
vocabulary*, which are unavoidable in software whose entire purpose is to
|
|
60
|
+
compute Pathfinder 2nd Edition character statistics, and which serve
|
|
61
|
+
identification and interoperability rather than substituting for Paizo's
|
|
62
|
+
published material. Nothing in this section is offered as a legal
|
|
63
|
+
conclusion; it is a description of the contents so a reader can judge for
|
|
64
|
+
themselves.
|
|
65
|
+
|
|
66
|
+
## Vendored fonts
|
|
67
|
+
|
|
68
|
+
`src/pf2e_mcp/server/sheet_assets.py` contains three font files as base64
|
|
69
|
+
WOFF2: **Noto Serif**, **Noto Serif Italic**, and **Noto Sans**, subset to
|
|
70
|
+
the Latin glyph range the HTML character sheet renderer prints, with the
|
|
71
|
+
variable `wght` axis preserved. They are
|
|
72
|
+
`Copyright 2022 The Noto Project Authors`
|
|
73
|
+
(https://github.com/notofonts/latin-greek-cyrillic) and licensed under the
|
|
74
|
+
**SIL Open Font License, Version 1.1** (https://openfontlicense.org).
|
|
75
|
+
|
|
76
|
+
**The full OFL text, with that copyright notice, is reproduced in
|
|
77
|
+
[`LICENSES/OFL-1.1.txt`](LICENSES/OFL-1.1.txt).** OFL Condition 2 requires
|
|
78
|
+
that each redistributed copy of the Font Software carry both the copyright
|
|
79
|
+
notice and the license itself -- a link to openfontlicense.org is not
|
|
80
|
+
sufficient on its own -- so that file, not this section, is what satisfies
|
|
81
|
+
the condition for this repository.
|
|
82
|
+
|
|
83
|
+
The OFL permits redistribution of the fonts, bundled with other software,
|
|
84
|
+
in original or modified (here, subsetted and format-converted) form, at no
|
|
85
|
+
cost, provided the licence and copyright notice travel with them and the
|
|
86
|
+
fonts are not sold on their own. Three consequences worth spelling out,
|
|
87
|
+
since this project both redistributes the fonts and generates files that
|
|
88
|
+
embed them:
|
|
89
|
+
|
|
90
|
+
- The subsets retain name ID 0, so the exact upstream copyright notice
|
|
91
|
+
travels inside each font binary as machine-readable metadata. Name IDs 13
|
|
92
|
+
and 14 (the license notice and URL) were dropped by `pyftsubset`'s default
|
|
93
|
+
`--name-IDs=0,1,2,3,4,5,6`, so the binaries alone do **not** carry the
|
|
94
|
+
license -- the human-readable copies described here are what cover it.
|
|
95
|
+
- **A rendered sheet is itself a redistribution of the Font Software**, since
|
|
96
|
+
the WOFF2 bytes are embedded in the HTML. So every sheet reproduces the
|
|
97
|
+
copyright notice and the full OFL text in its "Notices & Attribution"
|
|
98
|
+
section (`_OFL_PARAS` in `server/sheet.py`), exactly as it already does for
|
|
99
|
+
the OGL, and for the same reason: a sheet emailed to a player has to
|
|
100
|
+
satisfy Condition 2 on its own, without this file. That adds roughly 4 KB
|
|
101
|
+
and typically spills the attribution section onto a second printed page --
|
|
102
|
+
it is the last section of the sheet, so anyone who doesn't want the license
|
|
103
|
+
pages can simply not print them.
|
|
104
|
+
- The subset files are not renamed. OFL Section 3 only requires a Reserved
|
|
105
|
+
Font Name change when one exists; the Noto families reserve no font names,
|
|
106
|
+
so a subsetted "Noto Serif" may keep its name. The CSS family names
|
|
107
|
+
(`SheetSerif`, `SheetSans`) are internal aliases, not a rebrand of the
|
|
108
|
+
fonts themselves.
|
|
109
|
+
|
|
110
|
+
They are vendored rather than subset at request time so that rendering has
|
|
111
|
+
no dependency on `fonttools`, on `brotli`, or on which fonts happen to be
|
|
112
|
+
installed on the machine running the server.
|
|
113
|
+
|
|
114
|
+
## What this project downloads at build/run time
|
|
115
|
+
|
|
116
|
+
At build time (`python -m pf2e_mcp.ingestion.build`), this project downloads
|
|
117
|
+
structured Pathfinder 2nd Edition game data from the public, open-source
|
|
118
|
+
**foundryvtt/pf2e** project (https://github.com/foundryvtt/pf2e), maintained
|
|
119
|
+
by the PF2E for Foundry VTT volunteer development team and published under
|
|
120
|
+
Foundry Gaming LLC's license arrangement with Paizo Inc. That download is
|
|
121
|
+
not vendored or redistributed by this repository -- it happens fresh on the
|
|
122
|
+
end user's own machine, from foundryvtt/pf2e's own public GitHub releases,
|
|
123
|
+
each time the build step is run.
|
|
124
|
+
|
|
125
|
+
This project's own tools (`rules_search`, `rules_get_entry`, and the rest of
|
|
126
|
+
the `rules_*`/`build_*` tool surface) then serve pieces of that downloaded
|
|
127
|
+
content back to whoever is using this software. That is a real act of
|
|
128
|
+
redistribution on this software's part, even though no game data is stored
|
|
129
|
+
in this git repository -- this section exists to cover that.
|
|
130
|
+
|
|
131
|
+
## Licensing of the underlying game content
|
|
132
|
+
|
|
133
|
+
The Pathfinder 2nd Edition game content downloaded and served by this
|
|
134
|
+
project is licensed by its rights holder, **Paizo Inc.**, under two
|
|
135
|
+
licenses, depending on which sourcebook a given piece of content is from:
|
|
136
|
+
|
|
137
|
+
- **Open Game License Version 1.0a ("OGL")** -- covers legacy/pre-Remaster
|
|
138
|
+
Pathfinder 2nd Edition content (Core Rulebook through 2022-era books).
|
|
139
|
+
Full terms reproduced below.
|
|
140
|
+
- **ORC License** -- covers Pathfinder 2nd Edition Remaster content
|
|
141
|
+
(Player Core, GM Core, and everything published from late 2023 onward).
|
|
142
|
+
Registered at the U.S. Copyright Office, Library of Congress, TX
|
|
143
|
+
9-307-067, and available online at multiple mirrors; not reproduced in
|
|
144
|
+
full here (see "Where the attribution lists live" below for why).
|
|
145
|
+
|
|
146
|
+
This project's database distinguishes Remaster from legacy content per
|
|
147
|
+
entry (the `is_remaster` column in the ingested `entries` table), so it is
|
|
148
|
+
possible to determine which of the two licenses applies to any specific
|
|
149
|
+
piece of content this software serves.
|
|
150
|
+
|
|
151
|
+
### Where the attribution lists live
|
|
152
|
+
|
|
153
|
+
Both licenses require reproducing a running list of every sourcebook whose
|
|
154
|
+
content is included (OGL Section 15's "Copyright Notice"; the ORC License's
|
|
155
|
+
"Attribution Notice"). In `foundryvtt/pf2e`'s own copies, both of those
|
|
156
|
+
lists are already hundreds of entries long and grow with every new Paizo
|
|
157
|
+
release. Freezing a copy of either list into this file would go stale the
|
|
158
|
+
moment Paizo publishes something new -- and since this project always
|
|
159
|
+
downloads the *current* `foundryvtt/pf2e` release at build time rather than
|
|
160
|
+
a fixed snapshot, the only attribution list that stays accurate is
|
|
161
|
+
`foundryvtt/pf2e`'s own, live:
|
|
162
|
+
|
|
163
|
+
- OGL Copyright Notice: https://github.com/foundryvtt/pf2e/blob/master/static/licenses/OpenGameLicense.md
|
|
164
|
+
- ORC Attribution Notice: https://github.com/foundryvtt/pf2e/blob/master/static/licenses/ORCLicense.md
|
|
165
|
+
|
|
166
|
+
### Open Game License Version 1.0a -- full text
|
|
167
|
+
|
|
168
|
+
The following text is the property of Wizards of the Coast, Inc. and is
|
|
169
|
+
Copyright 2000 Wizards of the Coast, Inc. ("Wizards"). All Rights Reserved.
|
|
170
|
+
|
|
171
|
+
1. **Definitions:** (a)"Contributors" means the copyright and/or trademark
|
|
172
|
+
owners who have contributed Open Game Content; (b)"Derivative Material"
|
|
173
|
+
means copyrighted material including derivative works and translations
|
|
174
|
+
(including into other computer languages), potation, modification,
|
|
175
|
+
correction, addition, extension, upgrade, improvement, compilation,
|
|
176
|
+
abridgment or other form in which an existing work may be recast,
|
|
177
|
+
transformed or adapted; (c) "Distribute" means to reproduce, license,
|
|
178
|
+
rent, lease, sell, broadcast, publicly display, transmit or otherwise
|
|
179
|
+
distribute; (d)"Open Game Content" means the game mechanic and includes
|
|
180
|
+
the methods, procedures, processes and routines to the extent such
|
|
181
|
+
content does not embody the Product Identity and is an enhancement over
|
|
182
|
+
the prior art and any additional content clearly identified as Open
|
|
183
|
+
Game Content by the Contributor, and means any work covered by this
|
|
184
|
+
License, including translations and derivative works under copyright
|
|
185
|
+
law, but specifically excludes Product Identity. (e) "Product Identity"
|
|
186
|
+
means product and product line names, logos and identifying marks
|
|
187
|
+
including trade dress; artifacts; creatures characters; stories,
|
|
188
|
+
storylines, plots, thematic elements, dialogue, incidents, language,
|
|
189
|
+
artwork, symbols, designs, depictions, likenesses, formats, poses,
|
|
190
|
+
concepts, themes and graphic, photographic and other visual or audio
|
|
191
|
+
representations; names and descriptions of characters, spells,
|
|
192
|
+
enchantments, personalities, teams, personas, likenesses and special
|
|
193
|
+
abilities; places, locations, environments, creatures, equipment,
|
|
194
|
+
magical or supernatural abilities or effects, logos, symbols, or
|
|
195
|
+
graphic designs; and any other trademark or registered trademark
|
|
196
|
+
clearly identified as Product identity by the owner of the Product
|
|
197
|
+
Identity, and which specifically excludes the Open Game Content; (f)
|
|
198
|
+
"Trademark" means the logos, names, mark, sign, motto, designs that are
|
|
199
|
+
used by a Contributor to identify itself or its products or the
|
|
200
|
+
associated products contributed to the Open Game License by the
|
|
201
|
+
Contributor (g) "Use", "Used" or "Using" means to use, Distribute,
|
|
202
|
+
copy, edit, format, modify, translate and otherwise create Derivative
|
|
203
|
+
Material of Open Game Content. (h) "You" or "Your" means the licensee
|
|
204
|
+
in terms of this agreement.
|
|
205
|
+
2. **The License:** This License applies to any Open Game Content that
|
|
206
|
+
contains a notice indicating that the Open Game Content may only be
|
|
207
|
+
Used under and in terms of this License. You must affix such a notice
|
|
208
|
+
to any Open Game Content that you Use. No terms may be added to or
|
|
209
|
+
subtracted from this License except as described by the License
|
|
210
|
+
itself. No other terms or conditions may be applied to any Open Game
|
|
211
|
+
Content distributed using this License.
|
|
212
|
+
3. **Offer and Acceptance:** By Using the Open Game Content You indicate
|
|
213
|
+
Your acceptance of the terms of this License.
|
|
214
|
+
4. **Grant and Consideration:** In consideration for agreeing to use this
|
|
215
|
+
License, the Contributors grant You a perpetual, worldwide,
|
|
216
|
+
royalty-free, non-exclusive license with the exact terms of this
|
|
217
|
+
License to Use, the Open Game Content.
|
|
218
|
+
5. **Representation of Authority to Contribute:** If You are contributing
|
|
219
|
+
original material as Open Game Content, You represent that Your
|
|
220
|
+
Contributions are Your original creation and/or You have sufficient
|
|
221
|
+
rights to grant the rights conveyed by this License.
|
|
222
|
+
6. **Notice of License Copyright:** You must update the COPYRIGHT NOTICE
|
|
223
|
+
portion of this License to include the exact text of the COPYRIGHT
|
|
224
|
+
NOTICE of any Open Game Content You are copying, modifying or
|
|
225
|
+
distributing, and You must add the title, the copyright date, and the
|
|
226
|
+
copyright holder's name to the COPYRIGHT NOTICE of any original Open
|
|
227
|
+
Game Content you Distribute.
|
|
228
|
+
7. **Use of Product Identity:** You agree not to Use any Product Identity,
|
|
229
|
+
including as an indication as to compatibility, except as expressly
|
|
230
|
+
licensed in another, independent Agreement with the owner of each
|
|
231
|
+
element of that Product Identity. You agree not to indicate
|
|
232
|
+
compatibility or co-adaptability with any Trademark or Registered
|
|
233
|
+
Trademark in conjunction with a work containing Open Game Content
|
|
234
|
+
except as expressly licensed in another, independent Agreement with
|
|
235
|
+
the owner of such Trademark or Registered Trademark. The use of any
|
|
236
|
+
Product Identity in Open Game Content does not constitute a challenge
|
|
237
|
+
to the ownership of that Product Identity. The owner of any Product
|
|
238
|
+
Identity used in Open Game Content shall retain all rights, title and
|
|
239
|
+
interest in and to that Product Identity.
|
|
240
|
+
8. **Identification:** If you distribute Open Game Content You must
|
|
241
|
+
clearly indicate which portions of the work that you are distributing
|
|
242
|
+
are Open Game Content.
|
|
243
|
+
9. **Updating the License:** Wizards or its designated Agents may publish
|
|
244
|
+
updated versions of this License. You may use any authorized version
|
|
245
|
+
of this License to copy, modify and distribute any Open Game Content
|
|
246
|
+
originally distributed under any version of this License.
|
|
247
|
+
10. **Copy of this License:** You MUST include a copy of this License
|
|
248
|
+
with every copy of the Open Game Content You Distribute.
|
|
249
|
+
11. **Use of Contributor Credits:** You may not market or advertise the
|
|
250
|
+
Open Game Content using the name of any Contributor unless You have
|
|
251
|
+
written permission from the Contributor to do so.
|
|
252
|
+
12. **Inability to Comply:** If it is impossible for You to comply with
|
|
253
|
+
any of the terms of this License with respect to some or all of the
|
|
254
|
+
Open Game Content due to statute, judicial order, or governmental
|
|
255
|
+
regulation then You may not Use any Open Game Material so affected.
|
|
256
|
+
13. **Termination:** This License will terminate automatically if You
|
|
257
|
+
fail to comply with all terms herein and fail to cure such breach
|
|
258
|
+
within 30 days of becoming aware of the breach. All sublicenses shall
|
|
259
|
+
survive the termination of this License.
|
|
260
|
+
14. **Reformation:** If any provision of this License is held to be
|
|
261
|
+
unenforceable, such provision shall be reformed only to the extent
|
|
262
|
+
necessary to make it enforceable.
|
|
263
|
+
15. **COPYRIGHT NOTICE:** Open Game License v 1.0 Copyright 2000, Wizards
|
|
264
|
+
of the Coast, Inc. The full, current per-sourcebook copyright notice
|
|
265
|
+
(which titles' content is included) is maintained live by
|
|
266
|
+
`foundryvtt/pf2e` -- see "Where the attribution lists live" above
|
|
267
|
+
rather than a snapshot here.
|
|
268
|
+
|
|
269
|
+
### ORC License -- summary
|
|
270
|
+
|
|
271
|
+
The ORC License's own Section 1 notice, as reproduced in `foundryvtt/pf2e`:
|
|
272
|
+
"This product is licensed under the ORC License located at the Library of
|
|
273
|
+
Congress at TX 9-307-067 and available online at various locations. All
|
|
274
|
+
warranties are disclaimed as set forth therein."
|
|
275
|
+
|
|
276
|
+
Its Section 3 ("Reserved Material") is the direct source for the next
|
|
277
|
+
section below -- it explicitly carves out "all trademarks, registered
|
|
278
|
+
trademarks, proper nouns (characters, deities, locations, etc.[...]),
|
|
279
|
+
artworks, characters, dialogue, locations, organizations, plots,
|
|
280
|
+
storylines, and trade dress" from the license's open grant.
|
|
281
|
+
|
|
282
|
+
## Content not covered by an open license
|
|
283
|
+
|
|
284
|
+
Both licenses above explicitly exclude a category of content -- OGL calls
|
|
285
|
+
it "Product Identity," the ORC License calls it "Reserved Material" -- that
|
|
286
|
+
covers proper nouns, deity write-ups, named characters/locations, artwork,
|
|
287
|
+
and narrative/story content. That material is Paizo Inc.'s ordinary
|
|
288
|
+
copyrighted content, not freely licensed for redistribution the way
|
|
289
|
+
mechanical rules text is. `foundryvtt/pf2e` includes this content under
|
|
290
|
+
Foundry Gaming LLC's own specific license arrangement with Paizo Inc.; that
|
|
291
|
+
arrangement does not automatically extend to third parties, including this
|
|
292
|
+
project.
|
|
293
|
+
|
|
294
|
+
Two things this project does about that, neither of them a complete fix:
|
|
295
|
+
|
|
296
|
+
- **Bestiary, Monster Core, NPC Core, and full-adventure content is
|
|
297
|
+
excluded from ingestion entirely** (`ingestion/build.py`), not just
|
|
298
|
+
flagged. That's the single largest concentration of Product Identity/
|
|
299
|
+
Reserved Material in the upstream data -- unique named creatures and
|
|
300
|
+
adventure-specific narrative, by the dozens of sourcebooks -- and none
|
|
301
|
+
of it is used by this project's character-building tools, so excluding
|
|
302
|
+
it is a pure reduction in exposure with no functional cost.
|
|
303
|
+
- **What remains is classified, not filtered.** Content this project *does*
|
|
304
|
+
need for character building but that's still predominantly proper nouns
|
|
305
|
+
(deities, most visibly) is still ingested and served, but every
|
|
306
|
+
`rules_*` tool result now carries a `license` field
|
|
307
|
+
(`server/licensing.py`) noting which regime applies (OGL vs. ORC, from
|
|
308
|
+
the `is_remaster` flag) and whether the entry is likely Product Identity/
|
|
309
|
+
Reserved Material, based on which pack it came from. This is a
|
|
310
|
+
pack-level heuristic, not a per-entry legal determination -- a deity
|
|
311
|
+
entry's mechanical grants (a domain's initial spell, a favored weapon)
|
|
312
|
+
are genuine game mechanics even though the same entry's flavor text
|
|
313
|
+
(title, dogma, edicts) is squarely Product Identity, and the classifier
|
|
314
|
+
doesn't distinguish that. It exists so a caller *can* tell the two apart
|
|
315
|
+
before reusing content, not to guarantee they're already separated.
|
|
316
|
+
|
|
317
|
+
If this project is published or distributed, both of the above should
|
|
318
|
+
still be disclosed explicitly rather than assumed to be a complete
|
|
319
|
+
resolution -- they reduce risk, they don't eliminate it.
|
|
320
|
+
|
|
321
|
+
## Trademark disclaimer
|
|
322
|
+
|
|
323
|
+
**Pathfinder** and associated marks are trademarks of **Paizo Inc.**
|
|
324
|
+
This project is not affiliated with, endorsed by, or sponsored by
|
|
325
|
+
**Paizo Inc.**, and use of Paizo Inc.'s trademarks here is solely to
|
|
326
|
+
describe the compatibility/subject matter of this software.
|
|
327
|
+
|
|
328
|
+
## Attribution
|
|
329
|
+
|
|
330
|
+
This project depends on data from **foundryvtt/pf2e**
|
|
331
|
+
(https://github.com/foundryvtt/pf2e), maintained by the PF2E for Foundry
|
|
332
|
+
VTT volunteer development team and published under Foundry Gaming LLC's
|
|
333
|
+
license arrangement with Paizo Inc. See that project's own repository for
|
|
334
|
+
its full license terms. The underlying game content is licensed under the
|
|
335
|
+
Open Game License 1.0a (legacy content) and the ORC License (Remaster
|
|
336
|
+
content) -- see "Licensing of the underlying game content" above.
|