insight-ui-webmcp 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.
- insight_ui_webmcp-0.1.0/.gitignore +27 -0
- insight_ui_webmcp-0.1.0/LICENSE +204 -0
- insight_ui_webmcp-0.1.0/NOTICE +33 -0
- insight_ui_webmcp-0.1.0/PKG-INFO +231 -0
- insight_ui_webmcp-0.1.0/README.md +207 -0
- insight_ui_webmcp-0.1.0/pyproject.toml +78 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/__init__.py +5 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/__main__.py +8 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/apps.py +20 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/assets.py +34 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/checks.py +22 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/cli.py +3 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/finders.py +30 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/host_profiles.py +27 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/listing.py +3 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/management/__init__.py +1 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/management/client.py +16 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/management/commands/__init__.py +1 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/management/commands/webmcp_diff.py +22 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/management/commands/webmcp_doctor.py +54 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/management/commands/webmcp_export.py +38 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/management/commands/webmcp_init.py +25 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/management/commands/webmcp_prepare.py +129 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/management/commands/webmcp_status.py +98 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/management/commands/webmcp_validate.py +49 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/manifest.py +3 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/output_schemas.py +139 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/profiles/__init__.py +3 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/profiles/base.py +3 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/profiles/webpage.py +3 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/scaffold.py +3 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/templatetags/__init__.py +1 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/templatetags/webmcp_tags.py +85 -0
- insight_ui_webmcp-0.1.0/src/insight_ui_webmcp/validate.py +10 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
.venv/
|
|
2
|
+
__pycache__/
|
|
3
|
+
.pytest_cache/
|
|
4
|
+
.ruff_cache/
|
|
5
|
+
.mypy_cache/
|
|
6
|
+
.playwright-cli/
|
|
7
|
+
build/
|
|
8
|
+
dist/
|
|
9
|
+
*.egg-info/
|
|
10
|
+
*.pyc
|
|
11
|
+
*.pyo
|
|
12
|
+
*.pyd
|
|
13
|
+
.Python
|
|
14
|
+
*.so
|
|
15
|
+
.coverage
|
|
16
|
+
htmlcov/
|
|
17
|
+
.tox/
|
|
18
|
+
.nox/
|
|
19
|
+
output/
|
|
20
|
+
staticfiles/
|
|
21
|
+
node_modules/
|
|
22
|
+
.DS_Store
|
|
23
|
+
*.log
|
|
24
|
+
.env
|
|
25
|
+
.env.*
|
|
26
|
+
!.env.example
|
|
27
|
+
_wt/
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
Copyright (c) 2026 Alpin Insight Solutions GmbH & Co. KG
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
Apache License
|
|
5
|
+
Version 2.0, January 2004
|
|
6
|
+
http://www.apache.org/licenses/
|
|
7
|
+
|
|
8
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
9
|
+
|
|
10
|
+
1. Definitions.
|
|
11
|
+
|
|
12
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
13
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
14
|
+
|
|
15
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
16
|
+
the copyright owner that is granting the License.
|
|
17
|
+
|
|
18
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
19
|
+
other entities that control, are controlled by, or are under common
|
|
20
|
+
control with that entity. For the purposes of this definition,
|
|
21
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
22
|
+
direction or management of such entity, whether by contract or
|
|
23
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
24
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
25
|
+
|
|
26
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
27
|
+
exercising permissions granted by this License.
|
|
28
|
+
|
|
29
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
30
|
+
including but not limited to software source code, documentation
|
|
31
|
+
source, and configuration files.
|
|
32
|
+
|
|
33
|
+
"Object" form shall mean any form resulting from mechanical
|
|
34
|
+
transformation or translation of a Source form, including but
|
|
35
|
+
not limited to compiled object code, generated documentation,
|
|
36
|
+
and conversions to other media types.
|
|
37
|
+
|
|
38
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
39
|
+
Object form, made available under the License, as indicated by a
|
|
40
|
+
copyright notice that is included in or attached to the work
|
|
41
|
+
(an example is provided in the Appendix below).
|
|
42
|
+
|
|
43
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
44
|
+
form, that is based on (or derived from) the Work and for which the
|
|
45
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
46
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
47
|
+
of this License, Derivative Works shall not include works that remain
|
|
48
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
49
|
+
the Work and Derivative Works thereof.
|
|
50
|
+
|
|
51
|
+
"Contribution" shall mean any work of authorship, including
|
|
52
|
+
the original version of the Work and any modifications or additions
|
|
53
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
54
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
55
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
56
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
57
|
+
means any form of electronic, verbal, or written communication sent
|
|
58
|
+
to the Licensor or its representatives, including but not limited to
|
|
59
|
+
communication on electronic mailing lists, source code control systems,
|
|
60
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
61
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
62
|
+
excluding communication that is conspicuously marked or otherwise
|
|
63
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
64
|
+
|
|
65
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
66
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
67
|
+
subsequently incorporated within the Work.
|
|
68
|
+
|
|
69
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
70
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
71
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
72
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
73
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
74
|
+
Work and such Derivative Works in Source or Object form.
|
|
75
|
+
|
|
76
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
77
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
78
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
79
|
+
(except as stated in this section) patent license to make, have made,
|
|
80
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
81
|
+
where such license applies only to those patent claims licensable
|
|
82
|
+
by such Contributor that are necessarily infringed by their
|
|
83
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
84
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
85
|
+
institute patent litigation against any entity (including a
|
|
86
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
87
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
88
|
+
or contributory patent infringement, then any patent licenses
|
|
89
|
+
granted to You under this License for that Work shall terminate
|
|
90
|
+
as of the date such litigation is filed.
|
|
91
|
+
|
|
92
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
93
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
94
|
+
modifications, and in Source or Object form, provided that You
|
|
95
|
+
meet the following conditions:
|
|
96
|
+
|
|
97
|
+
(a) You must give any other recipients of the Work or
|
|
98
|
+
Derivative Works a copy of this License; and
|
|
99
|
+
|
|
100
|
+
(b) You must cause any modified files to carry prominent notices
|
|
101
|
+
stating that You changed the files; and
|
|
102
|
+
|
|
103
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
104
|
+
that You distribute, all copyright, patent, trademark, and
|
|
105
|
+
attribution notices from the Source form of the Work,
|
|
106
|
+
excluding those notices that do not pertain to any part of
|
|
107
|
+
the Derivative Works; and
|
|
108
|
+
|
|
109
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
110
|
+
distribution, then any Derivative Works that You distribute must
|
|
111
|
+
include a readable copy of the attribution notices contained
|
|
112
|
+
within such NOTICE file, excluding those notices that do not
|
|
113
|
+
pertain to any part of the Derivative Works, in at least one
|
|
114
|
+
of the following places: within a NOTICE text file distributed
|
|
115
|
+
as part of the Derivative Works; within the Source form or
|
|
116
|
+
documentation, if provided along with the Derivative Works; or,
|
|
117
|
+
within a display generated by the Derivative Works, if and
|
|
118
|
+
wherever such third-party notices normally appear. The contents
|
|
119
|
+
of the NOTICE file are for informational purposes only and
|
|
120
|
+
do not modify the License. You may add Your own attribution
|
|
121
|
+
notices within Derivative Works that You distribute, alongside
|
|
122
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
123
|
+
that such additional attribution notices cannot be construed
|
|
124
|
+
as modifying the License.
|
|
125
|
+
|
|
126
|
+
You may add Your own copyright statement to Your modifications and
|
|
127
|
+
may provide additional or different license terms and conditions
|
|
128
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
129
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
130
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
131
|
+
the conditions stated in this License.
|
|
132
|
+
|
|
133
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
134
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
135
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
136
|
+
this License, without any additional terms or conditions.
|
|
137
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
138
|
+
the terms of any separate license agreement you may have executed
|
|
139
|
+
with Licensor regarding such Contributions.
|
|
140
|
+
|
|
141
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
142
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
143
|
+
except as required for reasonable and customary use in describing the
|
|
144
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
145
|
+
|
|
146
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
147
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
148
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
149
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
150
|
+
implied, including, without limitation, any warranties or conditions
|
|
151
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
152
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
153
|
+
appropriateness of using or redistributing the Work and assume any
|
|
154
|
+
risks associated with Your exercise of permissions under this 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
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
182
|
+
|
|
183
|
+
To apply the Apache License to your work, attach the following
|
|
184
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
185
|
+
replaced with your own identifying information. (Don't include
|
|
186
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
187
|
+
comment syntax for the file format. We also recommend that a
|
|
188
|
+
file or class name and description of purpose be included on the
|
|
189
|
+
same "printed page" as the copyright notice for easier
|
|
190
|
+
identification within third-party archives.
|
|
191
|
+
|
|
192
|
+
Copyright [yyyy] [name of copyright owner]
|
|
193
|
+
|
|
194
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
195
|
+
you may not use this file except in compliance with the License.
|
|
196
|
+
You may obtain a copy of the License at
|
|
197
|
+
|
|
198
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
199
|
+
|
|
200
|
+
Unless required by applicable law or agreed to in writing, software
|
|
201
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
202
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
203
|
+
See the License for the specific language governing permissions and
|
|
204
|
+
limitations under the License.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
insight-ui-webmcp
|
|
2
|
+
Copyright (c) 2026 Alpin Insight Solutions GmbH & Co. KG
|
|
3
|
+
|
|
4
|
+
This product includes software developed by
|
|
5
|
+
Alpin Insight Solutions GmbH & Co. KG.
|
|
6
|
+
|
|
7
|
+
Product: insight-ui-webmcp
|
|
8
|
+
Repository: https://github.com/alpininsight/insight-ui-webmcp
|
|
9
|
+
|
|
10
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
+
you may not use this file except in compliance with the License.
|
|
12
|
+
You may obtain a copy of the License at
|
|
13
|
+
|
|
14
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
+
|
|
16
|
+
Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
See the License for the specific language governing permissions and
|
|
20
|
+
limitations under the License.
|
|
21
|
+
|
|
22
|
+
Packages: ais-webmcp, insight-ui-webmcp
|
|
23
|
+
|
|
24
|
+
Third-party software bundled in the browser helper (register.js, built from
|
|
25
|
+
js/register.source.cjs by scripts/build-js.cjs) remains under its own license:
|
|
26
|
+
|
|
27
|
+
- Ajv JSON schema validator (https://github.com/ajv-validator/ajv),
|
|
28
|
+
MIT License, Copyright (c) 2015-2021 Evgeny Poberezkin.
|
|
29
|
+
- fast-deep-equal (https://github.com/epoberezkin/fast-deep-equal),
|
|
30
|
+
MIT License, Copyright (c) 2017 Evgeny Poberezkin.
|
|
31
|
+
|
|
32
|
+
This NOTICE file is provided for attribution as contemplated by the Apache
|
|
33
|
+
License, Version 2.0. It does not modify the License.
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: insight-ui-webmcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Bring agent-ready website capabilities to Insight UI with WebMCP
|
|
5
|
+
Project-URL: Homepage, https://github.com/alpininsight/insight-ui-webmcp
|
|
6
|
+
Project-URL: Documentation, https://github.com/alpininsight/insight-ui-webmcp#readme
|
|
7
|
+
Project-URL: Issues, https://github.com/alpininsight/insight-ui-webmcp/issues
|
|
8
|
+
Author: Alpin Insight Solutions GmbH & Co. KG
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
License-File: NOTICE
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Framework :: Django
|
|
14
|
+
Classifier: Framework :: Django :: 6.0
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Requires-Python: >=3.12
|
|
19
|
+
Requires-Dist: ais-webmcp<0.2,>=0.1.0
|
|
20
|
+
Requires-Dist: django<7,>=6.0.4
|
|
21
|
+
Provides-Extra: ui
|
|
22
|
+
Requires-Dist: insight-ui<2,>=1.15.0; extra == 'ui'
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# Insight UI WebMCP — make your website agent-ready
|
|
26
|
+
|
|
27
|
+
Bring WebMCP to your Django website with an extension designed for Insight UI.
|
|
28
|
+
Expose public content, navigation and reviewed actions as explicit tools, while
|
|
29
|
+
your application keeps control of content, permissions and execution.
|
|
30
|
+
|
|
31
|
+
**DE:** Die WebMCP-Erweiterung für Insight UI: Machen Sie die Inhalte und Aktionen
|
|
32
|
+
Ihrer Django-Webseite für KI-Agenten verständlich und gezielt nutzbar.
|
|
33
|
+
|
|
34
|
+
## Packages at a glance
|
|
35
|
+
|
|
36
|
+
One browser runtime, register.js from the ais-webmcp core, delivered three ways;
|
|
37
|
+
this package is the Django adapter and uses the installed core instead of
|
|
38
|
+
shipping its own copy.
|
|
39
|
+
|
|
40
|
+
```mermaid
|
|
41
|
+
flowchart LR
|
|
42
|
+
Core["ais-webmcp (PyPI)<br/>manifest, CLI, register.js"]
|
|
43
|
+
Django["insight-ui-webmcp (PyPI)<br/>Django adapter"]
|
|
44
|
+
NPM["@alpininsightsolutions/webmcp (npm)<br/>register.js only"]
|
|
45
|
+
CDN["cdn.alpininsight.ai/ais-webmcp/vX.Y.Z/<br/>register.js"]
|
|
46
|
+
Core --> Django
|
|
47
|
+
Core --> NPM
|
|
48
|
+
Core --> CDN
|
|
49
|
+
Django --> S1["Django sites"]
|
|
50
|
+
NPM --> S2["other websites (bundlers)"]
|
|
51
|
+
CDN --> S3["script tag"]
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The npm package `@alpininsightsolutions/webmcp` and the CDN are pending first
|
|
55
|
+
release. The [ais-webmcp core](https://github.com/alpininsight/ais-webmcp)
|
|
56
|
+
owns register.js. The unscoped npm package `webmcp` is unrelated.
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
uv add insight-ui-webmcp
|
|
60
|
+
uv run python manage.py webmcp_prepare --profile webpage --dry-run
|
|
61
|
+
uv run python manage.py webmcp_prepare --profile webpage
|
|
62
|
+
uv run python manage.py webmcp_validate webmcp.manifest.json
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Add `insight_ui_webmcp` to `INSTALLED_APPS`, then load `{% webmcp_assets %}` from
|
|
66
|
+
`webmcp_tags` once in your site shell. The tag emits the helper only. It adds
|
|
67
|
+
`<meta http-equiv="origin-trial">` only when `WEBMCP_ORIGIN_TRIAL_TOKEN` is set,
|
|
68
|
+
and status never prints that value. In the page, `InsightUiWebmcp.status()`
|
|
69
|
+
reports `ok`, `no-origin-trial-meta` or `no-model-context`. Commit the host manifest; `webmcp_prepare`
|
|
70
|
+
keeps an existing file unless `--force` is passed. `subscribe_newsletter` is
|
|
71
|
+
written `enabled: false` and this package does not register a submit handler.
|
|
72
|
+
Explicit host profiles bind the shared manifest to your own content and handlers.
|
|
73
|
+
Read-only `webpage` tools declare an `outputSchema` (a JSON Schema object beside
|
|
74
|
+
`inputSchema`) so an agent can see the return value. See [Output schemas](#output-schemas).
|
|
75
|
+
Local staticfiles are the default; CDN use requires an immutable matching version
|
|
76
|
+
and your host's CSP approval.
|
|
77
|
+
|
|
78
|
+
## Settings
|
|
79
|
+
|
|
80
|
+
| Setting | Default | Effect |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| `WEBMCP_ENABLED` | `False` (host switch) | Hosts set it; `{% webmcp_attribution %}` renders only when it is `True` |
|
|
83
|
+
| `WEBMCP_ATTRIBUTION` | `True` | Visible attribution notice; `False` turns it off |
|
|
84
|
+
| `WEBMCP_ORIGIN_TRIAL_TOKEN` | unset | Emits the origin-trial meta tag; never printed by status |
|
|
85
|
+
| `WEBMCP_ASSET_MODE` | `"local"` | `"cdn"` requires `WEBMCP_CDN_VERSION` matching the installed `ais-webmcp` core |
|
|
86
|
+
| `WEBMCP_PROFILES` | `()` | Dotted host profile classes |
|
|
87
|
+
|
|
88
|
+
`{% webmcp_attribution %}` renders a small `<small>` element,
|
|
89
|
+
`Insight UI WebMCP · Apache-2.0 · © Alpin Insight Solutions GmbH & Co. KG`, linking
|
|
90
|
+
to alpininsight.ai. It has no script and no inline style; place it in your
|
|
91
|
+
footer and style it with `css_class="..."`. To turn it off for one template, use
|
|
92
|
+
`{% webmcp_attribution show=False %}`. We are a startup, and we appreciate it if
|
|
93
|
+
you keep the notice, which costs you nothing and stays out of the way. It is
|
|
94
|
+
optional and can be switched off. Redistribution requirements for
|
|
95
|
+
[LICENSE](LICENSE) and [NOTICE](NOTICE) remain separate; see Apache-2.0 section 4.
|
|
96
|
+
|
|
97
|
+
Python 3.12+, Django 6.0.4–6.x. Insight UI is an optional `ui` extra: existing
|
|
98
|
+
websites retain their own Core pin. The framework-independent `ais-webmcp`
|
|
99
|
+
command is included as a dependency, with no private host requirements.
|
|
100
|
+
|
|
101
|
+
The framework-independent [ais-webmcp core](https://github.com/alpininsight/ais-webmcp)
|
|
102
|
+
owns the shared schema and browser runtime. This repository contains the Django
|
|
103
|
+
adapter and has its own version; it exposes the installed Core asset without
|
|
104
|
+
copying it into the adapter distribution.
|
|
105
|
+
|
|
106
|
+
## Output schemas
|
|
107
|
+
|
|
108
|
+
`outputSchema` is optional on each tool. It is a JSON Schema object (Draft
|
|
109
|
+
2020-12), the same kind of object as `inputSchema`. That is the WebMCP
|
|
110
|
+
`ModelContextTool.outputSchema` / MCP `Tool.outputSchema` shape: agents read it
|
|
111
|
+
to see what a successful call returns. Leaving the key off means the result
|
|
112
|
+
shape is not declared. Read-only tools should set it. This package fills it for
|
|
113
|
+
the shipped `webpage` profile, using only values the tool contract already
|
|
114
|
+
returns.
|
|
115
|
+
|
|
116
|
+
| Tool | Declared result |
|
|
117
|
+
|---|---|
|
|
118
|
+
| `list_sections` | Array of section anchor ids |
|
|
119
|
+
| `get_section` | Text of the named section |
|
|
120
|
+
| `get_company_pitch` | Short pitch summary (text) |
|
|
121
|
+
| `list_products` | At most 12 product cards with `name`, `title`, `status`, and `description` |
|
|
122
|
+
| `get_contact` | Public contact details published by the host |
|
|
123
|
+
|
|
124
|
+
`go_to_section`, `open_legal`, and `start_conversation` do not publish a result
|
|
125
|
+
shape here. `subscribe_newsletter` stays `enabled: false` and has no output schema.
|
|
126
|
+
|
|
127
|
+
`webmcp_prepare --profile webpage` writes these schemas. A schema already stored
|
|
128
|
+
on a tool is kept. Any other profile is written unchanged.
|
|
129
|
+
|
|
130
|
+
`{% webmcp_assets %}` serves the installed Core `register.js` byte-for-byte.
|
|
131
|
+
Core validates declared output schemas and forwards them to
|
|
132
|
+
`document.modelContext.registerTool`. The adapter adds no validator monkey patch,
|
|
133
|
+
startup hook, copied runtime, or browser bridge. Standalone `ais-webmcp validate`
|
|
134
|
+
and `ais-webmcp doctor` accept the generated manifests without importing Django
|
|
135
|
+
or this adapter first.
|
|
136
|
+
|
|
137
|
+
The adapter installs the released Core from PyPI (`ais-webmcp>=0.1.0,<0.2`).
|
|
138
|
+
The development lock resolves Core `0.1.0`, released from
|
|
139
|
+
`5832024dc2f4d4014b7f627d12036bf15bf95992`; no private Git override is needed.
|
|
140
|
+
The shared negative-test corpus records that release in
|
|
141
|
+
`tests/fixtures/core-provenance.json`. CDN delivery remains separate.
|
|
142
|
+
|
|
143
|
+
### Host tools (insight-ui-docs and others)
|
|
144
|
+
|
|
145
|
+
A host declares the schema on its own tool in the committed manifest, or on the
|
|
146
|
+
dict returned by `build_manifest().to_dict()`. `webmcp_prepare` does not invent
|
|
147
|
+
one for a custom profile. Use `set_output_schema` or set the key directly, and
|
|
148
|
+
include only values the handler returns:
|
|
149
|
+
|
|
150
|
+
```python
|
|
151
|
+
from insight_ui_webmcp.output_schemas import set_output_schema
|
|
152
|
+
|
|
153
|
+
tool = set_output_schema(
|
|
154
|
+
{
|
|
155
|
+
"id": "search_components",
|
|
156
|
+
"name": "Search components",
|
|
157
|
+
"description": "Search public components.",
|
|
158
|
+
"inputSchema": {"type": "object", "properties": {}},
|
|
159
|
+
"annotations": {"readOnlyHint": True},
|
|
160
|
+
},
|
|
161
|
+
{"description": "JSON Schema for the value this handler returns."},
|
|
162
|
+
)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The same object in a committed `webmcp.manifest.json`:
|
|
166
|
+
|
|
167
|
+
```json
|
|
168
|
+
{
|
|
169
|
+
"id": "search_components",
|
|
170
|
+
"name": "Search components",
|
|
171
|
+
"description": "Search public components.",
|
|
172
|
+
"inputSchema": {"type": "object", "properties": {}},
|
|
173
|
+
"outputSchema": {
|
|
174
|
+
"description": "JSON Schema for the value this handler returns."
|
|
175
|
+
},
|
|
176
|
+
"annotations": {"readOnlyHint": true}
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Staticfiles configuration
|
|
181
|
+
|
|
182
|
+
Add the Core finder to your host's existing `STATICFILES_FINDERS`. For hosts
|
|
183
|
+
using Django's default finders:
|
|
184
|
+
|
|
185
|
+
```python
|
|
186
|
+
from django.conf.global_settings import STATICFILES_FINDERS as DEFAULT_FINDERS
|
|
187
|
+
|
|
188
|
+
STATICFILES_FINDERS = [
|
|
189
|
+
*DEFAULT_FINDERS,
|
|
190
|
+
"insight_ui_webmcp.finders.CoreRuntimeFinder",
|
|
191
|
+
]
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Keep any host-specific finders in the list. `collectstatic` continues to expose
|
|
195
|
+
`insight_ui_webmcp/js/register.js`, including hashed production filenames.
|
|
196
|
+
The finder reads the installed `ais-webmcp` package. CDN mode pins its version
|
|
197
|
+
at `https://cdn.alpininsight.ai/ais-webmcp/vX.Y.Z/register.js`.
|
|
198
|
+
|
|
199
|
+
## Development and release
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
uv sync --locked --all-groups
|
|
203
|
+
uv run --locked python -m django check --settings=tests.settings
|
|
204
|
+
uv run --locked pytest
|
|
205
|
+
uv run --locked pre-commit run --all-files
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
The adapter installs the stable compatible Core from PyPI. Core and adapter
|
|
209
|
+
versions are independent. CI event routing and the two-stage central package
|
|
210
|
+
producer/publication contract are documented in [CI and release evidence](docs/ci-and-release.md).
|
|
211
|
+
|
|
212
|
+
Split implementation and independent release/host gates:
|
|
213
|
+
[issue #63](https://github.com/alpininsight/insight-ui-webmcp/issues/63).
|
|
214
|
+
Development preview; public release and native-browser activation remain separate.
|
|
215
|
+
|
|
216
|
+
The private integration [documentation map](https://github.com/alpininsight/insight-ui-webmcp-docs/blob/develop/README.md)
|
|
217
|
+
and [guide](https://github.com/alpininsight/insight-ui-webmcp-docs/blob/develop/docs/guide/README.md)
|
|
218
|
+
cover both repositories. Cloudflare's optional edge integration complements
|
|
219
|
+
origin registration and does not replace it
|
|
220
|
+
([details](https://github.com/alpininsight/insight-ui-webmcp-docs/blob/develop/docs/reference/cloudflare-edge.md)).
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
### Debug staticfiles compatibility
|
|
224
|
+
|
|
225
|
+
`CoreRuntimeFinder.list()` accepts the optional `None` ignore-pattern value as
|
|
226
|
+
well as collectstatic's list. Post-merge audit of #64: installed-distribution
|
|
227
|
+
and production collectstatic checks passed, but debug asset discovery exercised
|
|
228
|
+
this untested input and raised TypeError. Regression probes cover both caller
|
|
229
|
+
forms and assert that enumeration still exposes only installed Core bytes.
|
|
230
|
+
When adding finders, verify debug discovery as well as production collection;
|
|
231
|
+
a successful container build covers only the latter runtime configuration.
|