@classcad/mcp 0.1.5 → 0.2.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/README.md +20 -2
- package/dist/auth.d.ts +7 -0
- package/dist/auth.js +2 -2
- package/dist/auth.js.map +1 -1
- package/dist/mcp-server.d.ts +1 -1
- package/dist/mcp-server.js +9 -3
- package/dist/mcp-server.js.map +1 -1
- package/dist/queue.d.ts +7 -0
- package/dist/queue.js +22 -9
- package/dist/queue.js.map +1 -1
- package/dist/tools/auth.js +1 -1
- package/dist/tools/auth.js.map +1 -1
- package/dist/tools/lifecycle.js +40 -18
- package/dist/tools/lifecycle.js.map +1 -1
- package/dist/tools/viewer.d.ts +6 -0
- package/dist/tools/viewer.js +110 -0
- package/dist/tools/viewer.js.map +1 -0
- package/dist/viewer/scene.d.ts +60 -0
- package/dist/viewer/scene.js +271 -0
- package/dist/viewer/scene.js.map +1 -0
- package/dist/viewer/server.d.ts +27 -0
- package/dist/viewer/server.js +229 -0
- package/dist/viewer/server.js.map +1 -0
- package/dist/viewer-page/cube.svg +15 -0
- package/dist/viewer-page/fonts/LICENSE.txt +3 -0
- package/dist/viewer-page/fonts/jetbrains-mono-latin.woff2 +0 -0
- package/dist/viewer-page/index.html +135 -0
- package/dist/viewer-page/vendor/LICENSE.txt +21 -0
- package/dist/viewer-page/vendor/VERSION.txt +1 -0
- package/dist/viewer-page/vendor/addons/controls/OrbitControls.js +1963 -0
- package/dist/viewer-page/vendor/addons/lines/LineMaterial.js +726 -0
- package/dist/viewer-page/vendor/addons/lines/LineSegments2.js +434 -0
- package/dist/viewer-page/vendor/addons/lines/LineSegmentsGeometry.js +298 -0
- package/dist/viewer-page/vendor/three.core.min.js +6 -0
- package/dist/viewer-page/vendor/three.module.min.js +6 -0
- package/dist/viewer-page/viewer.css +717 -0
- package/dist/viewer-page/viewer.js +530 -0
- package/package.json +3 -2
|
Binary file
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<meta name="color-scheme" content="light dark" />
|
|
7
|
+
<title>ClassCAD</title>
|
|
8
|
+
<link rel="icon" href="/assets/cube.svg" />
|
|
9
|
+
<link rel="stylesheet" href="/assets/viewer.css" />
|
|
10
|
+
<!-- the theme, before the first paint -->
|
|
11
|
+
<script nonce="__NONCE__">
|
|
12
|
+
;(() => {
|
|
13
|
+
let pick = null
|
|
14
|
+
try {
|
|
15
|
+
pick = localStorage.getItem('classcad-mcp:theme')
|
|
16
|
+
} catch {}
|
|
17
|
+
const dark = pick ? pick === 'dark' : matchMedia('(prefers-color-scheme: dark)').matches
|
|
18
|
+
document.documentElement.dataset.theme = dark ? 'dark' : 'light'
|
|
19
|
+
})()
|
|
20
|
+
</script>
|
|
21
|
+
<script type="importmap" nonce="__NONCE__">
|
|
22
|
+
{ "imports": { "three": "/assets/vendor/three.module.min.js", "three/addons/": "/assets/vendor/addons/" } }
|
|
23
|
+
</script>
|
|
24
|
+
</head>
|
|
25
|
+
<body>
|
|
26
|
+
<div class="app" id="app" data-state="loading">
|
|
27
|
+
<header class="bar">
|
|
28
|
+
<div class="bar__lead">
|
|
29
|
+
<svg class="mark" viewBox="0 0 200 200" width="20" height="20" aria-hidden="true">
|
|
30
|
+
<defs>
|
|
31
|
+
<mask id="cube">
|
|
32
|
+
<rect width="200" height="200" fill="#fff" />
|
|
33
|
+
<path d="M100 -4V204M100 100L4 44.5M100 100L196 44.5" stroke="#000" stroke-width="10" />
|
|
34
|
+
</mask>
|
|
35
|
+
</defs>
|
|
36
|
+
<g mask="url(#cube)">
|
|
37
|
+
<path d="M100 0L13 50L100 100Z" class="mark__b" />
|
|
38
|
+
<path d="M100 0L187 50L100 100Z" class="mark__a" />
|
|
39
|
+
<path d="M13 50L100 100V200L13 150Z" class="mark__a" />
|
|
40
|
+
<path d="M187 50L100 100V200L187 150Z" class="mark__b" />
|
|
41
|
+
</g>
|
|
42
|
+
</svg>
|
|
43
|
+
<span class="bar__name">ClassCAD</span>
|
|
44
|
+
<span class="bar__rule" aria-hidden="true"></span>
|
|
45
|
+
<div class="menu" id="export">
|
|
46
|
+
<button type="button" class="tool tool--word" id="export-button" aria-haspopup="menu" aria-expanded="false">
|
|
47
|
+
<svg viewBox="0 0 20 20" width="20" height="20" aria-hidden="true"><path class="pen" d="M10 3v9M6.5 8.5 10 12l3.5-3.5" /><path class="pen" d="M4 14v2.5h12V14" /></svg>
|
|
48
|
+
<span>Export</span>
|
|
49
|
+
</button>
|
|
50
|
+
<div class="menu__list" role="menu" hidden>
|
|
51
|
+
<p class="menu__title">The model as a file</p>
|
|
52
|
+
<a role="menuitem" class="menu__row" data-export="stp" href="#"><span class="menu__name">STEP</span><span class="call">.stp · exact geometry</span></a>
|
|
53
|
+
<a role="menuitem" class="menu__row" data-export="stl" href="#"><span class="menu__name">STL</span><span class="call">.stl · triangles</span></a>
|
|
54
|
+
<a role="menuitem" class="menu__row" data-export="glb" href="#"><span class="menu__name">glTF</span><span class="call">.glb · triangles, colours</span></a>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="bar__trail">
|
|
59
|
+
<button type="button" class="theme" id="theme" aria-pressed="false" aria-label="Dark mode" title="Light or dark">
|
|
60
|
+
<span class="theme__disc" aria-hidden="true"></span>
|
|
61
|
+
</button>
|
|
62
|
+
</div>
|
|
63
|
+
</header>
|
|
64
|
+
|
|
65
|
+
<aside class="side" aria-label="The model">
|
|
66
|
+
<div class="head">
|
|
67
|
+
<p class="kicker" id="kind">Part</p>
|
|
68
|
+
<h1 class="docname" id="name"> </h1>
|
|
69
|
+
</div>
|
|
70
|
+
<section class="pane">
|
|
71
|
+
<div class="pane__label"><span>Features</span><span class="num" id="feature-count"></span></div>
|
|
72
|
+
<ol class="rows" id="features"></ol>
|
|
73
|
+
</section>
|
|
74
|
+
<section class="pane">
|
|
75
|
+
<div class="pane__label"><span>Bodies</span><span class="num" id="body-count"></span></div>
|
|
76
|
+
<ul class="rows" id="bodies"></ul>
|
|
77
|
+
</section>
|
|
78
|
+
</aside>
|
|
79
|
+
|
|
80
|
+
<main class="stage" id="stage">
|
|
81
|
+
<canvas id="canvas" aria-label="The model, in 3D"></canvas>
|
|
82
|
+
<i class="corner corner--tl" aria-hidden="true"></i><i class="corner corner--tr" aria-hidden="true"></i>
|
|
83
|
+
<i class="corner corner--bl" aria-hidden="true"></i><i class="corner corner--br" aria-hidden="true"></i>
|
|
84
|
+
<p class="hud" id="hud"></p>
|
|
85
|
+
<div class="dock" role="toolbar" aria-label="View">
|
|
86
|
+
<button type="button" class="tool" data-view="iso" aria-label="Isometric view" data-tip="Isometric">
|
|
87
|
+
<svg viewBox="0 0 20 20" width="20" height="20" aria-hidden="true"><path class="pen" d="M10 3 16 6.5v7L10 17l-6-3.5v-7zM10 10v7M10 10 4 6.5M10 10l6-3.5" /></svg>
|
|
88
|
+
</button>
|
|
89
|
+
<button type="button" class="tool" data-view="front" aria-label="Front view" data-tip="Front">
|
|
90
|
+
<svg viewBox="0 0 20 20" width="20" height="20" aria-hidden="true"><path class="pen pen--pale" d="M4 7 7 4h9v9l-3 3M13 7l3-3" /><path class="pen pen--face" d="M4 7h9v9H4z" /></svg>
|
|
91
|
+
</button>
|
|
92
|
+
<button type="button" class="tool" data-view="top" aria-label="Top view" data-tip="Top">
|
|
93
|
+
<svg viewBox="0 0 20 20" width="20" height="20" aria-hidden="true"><path class="pen pen--pale" d="M4 7v9h9l3-3V4M13 7v9" /><path class="pen pen--face" d="M4 7 7 4h9l-3 3z" /></svg>
|
|
94
|
+
</button>
|
|
95
|
+
<button type="button" class="tool" data-view="right" aria-label="Right view" data-tip="Right">
|
|
96
|
+
<svg viewBox="0 0 20 20" width="20" height="20" aria-hidden="true"><path class="pen pen--pale" d="M13 7H4v9h9M4 7l3-3h9" /><path class="pen pen--face" d="M13 7l3-3v9l-3 3z" /></svg>
|
|
97
|
+
</button>
|
|
98
|
+
<span class="dock__rule" aria-hidden="true"></span>
|
|
99
|
+
<button type="button" class="tool" id="fit" aria-label="Fit the model in view" data-tip="Fit">
|
|
100
|
+
<svg viewBox="0 0 20 20" width="20" height="20" aria-hidden="true"><path class="pen" d="M3 7V3h4M13 3h4v4M17 13v4h-4M7 17H3v-4" /><path class="pen pen--face" d="M7.5 7.5h5v5h-5z" /></svg>
|
|
101
|
+
</button>
|
|
102
|
+
<button type="button" class="tool" id="edges" aria-pressed="true" aria-label="Edges" data-tip="Edges">
|
|
103
|
+
<svg viewBox="0 0 20 20" width="20" height="20" aria-hidden="true"><path class="pen pen--pale" d="M10 10v7M10 10 4 6.5M10 10l6-3.5" /><path class="pen" d="M10 3 16 6.5v7L10 17l-6-3.5v-7z" /></svg>
|
|
104
|
+
</button>
|
|
105
|
+
</div>
|
|
106
|
+
<svg class="triad" id="triad" viewBox="-30 -30 60 60" width="60" height="60" aria-hidden="true">
|
|
107
|
+
<line id="triad-x" class="triad__x" x1="0" y1="0" /><line id="triad-y" class="triad__y" x1="0" y1="0" /><line id="triad-z" class="triad__z" x1="0" y1="0" />
|
|
108
|
+
<text id="triad-lx" class="triad__x">X</text><text id="triad-ly" class="triad__y">Y</text><text id="triad-lz" class="triad__z">Z</text>
|
|
109
|
+
</svg>
|
|
110
|
+
<div class="waiting" id="waiting">
|
|
111
|
+
<p class="waiting__line"><span class="arc" aria-hidden="true"></span><span id="waiting-label">Waiting for the model</span></p>
|
|
112
|
+
<p class="waiting__note" id="waiting-note">No model yet. What your agent builds appears here.</p>
|
|
113
|
+
</div>
|
|
114
|
+
<div class="scrim" id="scrim" hidden>
|
|
115
|
+
<div class="card">
|
|
116
|
+
<p class="card__label">Disconnected</p>
|
|
117
|
+
<p class="card__text" id="scrim-text">The session behind this view has ended. What you see is its last model.</p>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</main>
|
|
121
|
+
|
|
122
|
+
<footer class="title" aria-label="Status">
|
|
123
|
+
<div class="cell cell--live"><span class="dot" id="dot" aria-hidden="true"></span><span id="engine">ClassCAD</span></div>
|
|
124
|
+
<div class="cell cell--fill" id="doing"></div>
|
|
125
|
+
<div class="cell"><span class="cell__k">Bodies</span><b id="s-bodies">0</b></div>
|
|
126
|
+
<div class="cell cell--wider"><span class="cell__k">Faces</span><b id="s-faces">0</b></div>
|
|
127
|
+
<div class="cell cell--wider"><span class="cell__k">Triangles</span><b id="s-tris">0</b></div>
|
|
128
|
+
<div class="cell"><span class="cell__k">Size</span><b id="s-size">–</b></div>
|
|
129
|
+
<div class="cell cell--wide"><span class="cell__k">Host</span><b id="s-host">–</b></div>
|
|
130
|
+
</footer>
|
|
131
|
+
<div class="tip" id="tip" role="tooltip" hidden></div>
|
|
132
|
+
</div>
|
|
133
|
+
<script type="module" src="/assets/viewer.js" nonce="__NONCE__"></script>
|
|
134
|
+
</body>
|
|
135
|
+
</html>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License
|
|
2
|
+
|
|
3
|
+
Copyright © 2010-2026 three.js authors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
three 0.185.1 (MIT), copied at build time
|