spi3der 26.11.20005 → 26.11.21002
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/Dockerfile +7 -3
- package/README.md +65 -4
- package/api/mcp.mjs +15 -1
- package/bin/cloud-run.mjs +83 -0
- package/favicon.svg +1 -15
- package/help.md +4 -1
- package/index.html +12 -5
- package/manifest.webmanifest +3 -21
- package/mcp/diagnostics.js +72 -0
- package/mcp/workshop-app.js +53 -9
- package/mcp/workshop-widget.js +35 -3
- package/media/spi3der-brand.svg +1 -0
- package/package.json +4 -2
- package/sw.js +3 -3
package/Dockerfile
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# spi3der Cloud Run: serve the browser application and Streamable HTTP MCP endpoint.
|
|
2
|
+
FROM node:22-alpine
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
COPY . .
|
|
5
|
+
ENV NODE_ENV=production
|
|
6
|
+
ENV PORT=8080
|
|
4
7
|
EXPOSE 8080
|
|
8
|
+
CMD ["node", "bin/cloud-run.mjs"]
|
package/README.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# spi3der
|
|
2
|
+
|
|
3
|
+

|
|
2
4
|
|
|
3
5
|
Interactive 3D creation and exploration, powered by **3Draft**. Based on the 2026 Fifth Percent competition sprint.
|
|
4
6
|
|
|
@@ -25,17 +27,76 @@ npx spi3der
|
|
|
25
27
|
|
|
26
28
|
Open http://localhost:5173. No application build system is needed.
|
|
27
29
|
|
|
28
|
-
##
|
|
30
|
+
## Project boundaries and deployments
|
|
31
|
+
|
|
32
|
+
- **spider-paint** (`Pengeszikra/Spider-Paint`) is the separate legacy project, deployed independently to Vercel and Cloud Run.
|
|
33
|
+
- **spi3der** (`Pengeszikra/spi3der`) is deployed to Cloud Run only, at `spi3der.run.app`, and has the `spi3der` npm package. There is no spi3der Vercel deployment.
|
|
34
|
+
- **3Draft** (`Pengeszikra/3Draft`) is the separate 3D engine repository and npm module.
|
|
35
|
+
|
|
36
|
+
The product name is always lowercase **spi3der**. The app header can retain **3Draft** as a quiet engine attribution.
|
|
37
|
+
|
|
38
|
+
## Cloud Run (browser app + MCP)
|
|
39
|
+
|
|
40
|
+
The Dockerfile now starts `bin/cloud-run.mjs` with Node.js on the Cloud Run `PORT`.
|
|
41
|
+
One origin serves the browser application, `POST /mcp` and the compatible `POST /api/mcp` endpoint.
|
|
42
|
+
It does **not** require a Vercel deployment. The legacy scene-store API is not hosted here.
|
|
29
43
|
|
|
30
44
|
```sh
|
|
45
|
+
# Authenticate with the Google Cloud project that owns spi3der before deploying:
|
|
31
46
|
gcloud run deploy spi3der --source . --region europe-west1 --allow-unauthenticated
|
|
47
|
+
# Check the actual Cloud Run service URL; do not guess the hostname:
|
|
48
|
+
gcloud run services describe spi3der --region europe-west1 --format='value(status.url)'
|
|
32
49
|
```
|
|
33
50
|
|
|
34
|
-
|
|
51
|
+
Use the returned service URL plus `/mcp` as the ChatGPT custom MCP server URL.
|
|
52
|
+
Test locally with `PORT=8080 node bin/cloud-run.mjs` and `node tests/cloud-run.mjs`.
|
|
53
|
+
A GitHub push alone does not deploy Cloud Run unless the project has configured its own deployment trigger.
|
|
54
|
+
|
|
55
|
+
## MCP debugging and timeout correlation
|
|
56
|
+
|
|
57
|
+
The `open_workshop` response returns a random `trace_id` in `structuredContent`
|
|
58
|
+
and in the textual tool result; the HTTP response also supplies `x-spi3der-trace-id`.
|
|
59
|
+
Use the MCP tool `debug_trace({trace_id})` to inspect a **recent** request.
|
|
60
|
+
Milestones include `request_received`, `model_started`, `model_finished`,
|
|
61
|
+
`scene_unpacked`, `response_ready` and `request_failed`.
|
|
62
|
+
Each event has elapsed milliseconds; the successful response records payload size
|
|
63
|
+
and scene object/vertex/face counts. Raw prompts, scenes, URLs and request bodies
|
|
64
|
+
are **not logged**.
|
|
65
|
+
|
|
66
|
+
The embedded widget optionally reports `widget_loaded`, `widget_rendered`,
|
|
67
|
+
`widget_empty`, or `widget_error` via `window.openai.callTool` when supported
|
|
68
|
+
by the host. **No widget feedback is not proof of a crash:** host sandboxes may
|
|
69
|
+
disallow callbacks, or rendering can time out before telemetry is delivered.
|
|
70
|
+
If the host times out before returning the response, inspect Cloud Run
|
|
71
|
+
structured logs for `component=spi3der-mcp` around the failure time instead.
|
|
72
|
+
Correlate using the `traceId` field (Cloud Run may have multiple instances).
|
|
73
|
+
|
|
74
|
+
Traces are deliberately metadata-only, kept **in memory for at most 15 minutes**
|
|
75
|
+
and limited to 128 per instance. `debug_trace` requires the unguessable trace ID;
|
|
76
|
+
there is no public endpoint listing other users' requests. For durable debugging,
|
|
77
|
+
use private Google Cloud Logging access. This cannot observe ChatGPT's internal
|
|
78
|
+
timeouts, only the stages that the server or widget actually reports.
|
|
79
|
+
|
|
80
|
+
To smoke-test locally:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
npm run test:mcp-app
|
|
84
|
+
node tests/cloud-run.mjs
|
|
85
|
+
```
|
|
35
86
|
|
|
36
87
|
## npm
|
|
37
88
|
|
|
38
|
-
The package name is `spi3der`, with a CLI that hosts the app locally. The
|
|
89
|
+
The package name is `spi3der`, with a CLI that hosts the app locally. The project uses its existing date-based `YY.M.DNNN` version scheme (`scripts/bump.mjs`) for npm releases as well.
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
npm run release -- --dry-run # preview next date-based version, no changes
|
|
93
|
+
npm run release # bump package.json, then npm publish
|
|
94
|
+
git add package.json
|
|
95
|
+
git commit -m "Release spi3der"
|
|
96
|
+
git push
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Run `npm run release` instead of `npm publish`: direct publishing is guarded against accidentally reusing an existing version. The bump happens **before** npm constructs the tarball; npm's `prepublishOnly` hook runs too late to change the version npm has already chosen. Publication still requires your npm authentication and is not automatically triggered by a GitHub push. The project is licensed under MIT (see LICENSE).
|
|
39
100
|
|
|
40
101
|
## Compatibility
|
|
41
102
|
|
package/api/mcp.mjs
CHANGED
|
@@ -36,7 +36,21 @@ export default async function handler(req, res) {
|
|
|
36
36
|
}catch(e){if(out===undefined && e instanceof SyntaxError) { /* hand malformed input to standard transport */ } else if(out===undefined)throw e;}
|
|
37
37
|
}
|
|
38
38
|
out??=await handleHttp({ method: req.method, body, origin, fetchText });
|
|
39
|
-
|
|
39
|
+
// Expose a correlation ID for successful/failed workshop tool responses.
|
|
40
|
+
// It carries no prompts, meshes or other user data.
|
|
41
|
+
try {
|
|
42
|
+
const message=typeof out.body==='string'&&out.body?JSON.parse(out.body):null;
|
|
43
|
+
const traceId=message?.result?.structuredContent?.trace_id
|
|
44
|
+
|| (message?.result?.isError && JSON.parse(message.result.content?.[0]?.text||'null')?.trace_id);
|
|
45
|
+
if(traceId && /^[0-9a-f-]{36}$/.test(traceId)) {
|
|
46
|
+
res.setHeader('x-spi3der-trace-id',traceId);
|
|
47
|
+
res.setHeader('access-control-expose-headers','mcp-protocol-version, x-spi3der-trace-id');
|
|
48
|
+
}
|
|
49
|
+
} catch { /* never let observability change MCP transport behavior */ }
|
|
50
|
+
for (const [k, v] of Object.entries(out.headers ?? {})) {
|
|
51
|
+
if(k.toLowerCase()==='access-control-expose-headers' && res.hasHeader('access-control-expose-headers')) continue;
|
|
52
|
+
res.setHeader(k, v);
|
|
53
|
+
}
|
|
40
54
|
res.statusCode = out.status;
|
|
41
55
|
res.end(out.body ?? '');
|
|
42
56
|
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Cloud Run entrypoint: serve the spi3der browser app and its MCP endpoint on one origin.
|
|
3
|
+
// This is intentionally independent of spider-paint and of any Vercel deployment.
|
|
4
|
+
import { createServer } from 'node:http';
|
|
5
|
+
import { readFile } from 'node:fs/promises';
|
|
6
|
+
import { extname, resolve, dirname, sep } from 'node:path';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
import mcpHandler from '../api/mcp.mjs';
|
|
9
|
+
|
|
10
|
+
const root = resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
|
11
|
+
const port = Number(process.env.PORT || 8080);
|
|
12
|
+
const types = {
|
|
13
|
+
'.html': 'text/html; charset=utf-8',
|
|
14
|
+
'.js': 'text/javascript; charset=utf-8',
|
|
15
|
+
'.mjs': 'text/javascript; charset=utf-8',
|
|
16
|
+
'.css': 'text/css; charset=utf-8',
|
|
17
|
+
'.json': 'application/json; charset=utf-8',
|
|
18
|
+
'.svg': 'image/svg+xml',
|
|
19
|
+
'.png': 'image/png',
|
|
20
|
+
'.jpg': 'image/jpeg',
|
|
21
|
+
'.jpeg': 'image/jpeg',
|
|
22
|
+
'.webp': 'image/webp',
|
|
23
|
+
'.avif': 'image/avif',
|
|
24
|
+
'.webmanifest': 'application/manifest+json',
|
|
25
|
+
'.md': 'text/plain; charset=utf-8',
|
|
26
|
+
'.wasm': 'application/wasm',
|
|
27
|
+
'.woff2': 'font/woff2',
|
|
28
|
+
'.ico': 'image/x-icon',
|
|
29
|
+
};
|
|
30
|
+
const publicFiles = new Set([
|
|
31
|
+
'index.html', 'player.html', 'emulator.html', 'sky.html',
|
|
32
|
+
'xr-test.html', 'xr-compare.html', 'workshop.html',
|
|
33
|
+
'favicon.svg', 'manifest.webmanifest', 'sw.js', 'help.md', 'sky.md',
|
|
34
|
+
]);
|
|
35
|
+
const publicDirs = new Set(['src', 'engine', 'models', 'media', 'icons', 'app']);
|
|
36
|
+
async function serveStatic(req, res, url) {
|
|
37
|
+
if (req.method !== 'GET' && req.method !== 'HEAD') {
|
|
38
|
+
res.writeHead(405, { Allow: 'GET, HEAD' }).end();
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
let pathname;
|
|
42
|
+
try { pathname = decodeURIComponent(url.pathname); }
|
|
43
|
+
catch { res.writeHead(400).end('Invalid path'); return; }
|
|
44
|
+
const parts = pathname.split('/').filter(Boolean);
|
|
45
|
+
if (parts.some(p => p === '.' || p === '..' || p.startsWith('.'))) {
|
|
46
|
+
res.writeHead(403).end('Forbidden'); return;
|
|
47
|
+
}
|
|
48
|
+
const rel = parts.join('/') || 'index.html';
|
|
49
|
+
if (!publicFiles.has(rel) && !publicDirs.has(parts[0])) {
|
|
50
|
+
res.writeHead(404).end('Not found'); return;
|
|
51
|
+
}
|
|
52
|
+
const file = resolve(root, rel);
|
|
53
|
+
if (!file.startsWith(root + sep)) {
|
|
54
|
+
res.writeHead(403).end('Forbidden'); return;
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
const data = await readFile(file);
|
|
58
|
+
res.writeHead(200, {
|
|
59
|
+
'Content-Type': types[extname(file).toLowerCase()] || 'application/octet-stream',
|
|
60
|
+
'X-Content-Type-Options': 'nosniff',
|
|
61
|
+
'Cache-Control': 'public, max-age=300',
|
|
62
|
+
});
|
|
63
|
+
res.end(req.method === 'HEAD' ? undefined : data);
|
|
64
|
+
} catch {
|
|
65
|
+
res.writeHead(404).end('Not found');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
createServer(async (req, res) => {
|
|
69
|
+
try {
|
|
70
|
+
const url = new URL(req.url || '/', 'http://localhost');
|
|
71
|
+
if (url.pathname === '/mcp' || url.pathname === '/api/mcp') {
|
|
72
|
+
await mcpHandler(req, res);
|
|
73
|
+
} else {
|
|
74
|
+
await serveStatic(req, res, url);
|
|
75
|
+
}
|
|
76
|
+
} catch (err) {
|
|
77
|
+
console.error('spi3der request failed:', err);
|
|
78
|
+
if (!res.headersSent) res.writeHead(500, { 'Content-Type': 'text/plain' });
|
|
79
|
+
res.end('Internal server error');
|
|
80
|
+
}
|
|
81
|
+
}).listen(port, '0.0.0.0', () => {
|
|
82
|
+
console.log('spi3der Cloud Run server listening on ' + port);
|
|
83
|
+
});
|
package/favicon.svg
CHANGED
|
@@ -1,15 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0
|
|
2
|
-
<rect width="512" height="512" rx="112" fill="#0b0b0a"/>
|
|
3
|
-
<rect x="14" y="14" width="484" height="484" rx="100" fill="none" stroke="#cfc9a0" stroke-width="6" opacity=".55"/>
|
|
4
|
-
<!-- a cube drawn as a model: cream faces, teal edge, one red point, and a spider thread -->
|
|
5
|
-
<g stroke-linejoin="round">
|
|
6
|
-
<path d="M256 104 392 180 392 332 256 408 120 332 120 180Z" fill="#d9d3a7"/>
|
|
7
|
-
<path d="M256 256 392 180 256 104 120 180Z" fill="#efe9c9"/>
|
|
8
|
-
<path d="M256 256 256 408 120 332 120 180Z" fill="#b8b287"/>
|
|
9
|
-
<path d="M256 256 256 408 392 332 392 180Z" fill="#8f8a66"/>
|
|
10
|
-
<path d="M120 180 256 256 392 180M256 256V408" fill="none" stroke="#0b0b0a" stroke-width="8"/>
|
|
11
|
-
<path d="M256 104 392 180 392 332 256 408 120 332 120 180Z" fill="none" stroke="#0b0b0a" stroke-width="8"/>
|
|
12
|
-
<path d="M256 256 392 332" stroke="#2fb8c0" stroke-width="12" stroke-linecap="round"/>
|
|
13
|
-
</g>
|
|
14
|
-
<circle cx="256" cy="256" r="22" fill="#f1481c" stroke="#0b0b0a" stroke-width="8"/>
|
|
15
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 96 96"><image href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDABELDA8MChEPDg8TEhEUGSobGRcXGTMkJh4qPDU/Pjs1OjlDS2BRQ0daSDk6U3FUWmNma2xrQFB2fnRofWBpa2f/2wBDARITExkWGTEbGzFnRTpFZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2f/wAARCABgAGADASIAAhEBAxEB/8QAGgAAAgMBAQAAAAAAAAAAAAAAAAQBAwUCBv/EADUQAAIBAwIEBAQDCAMAAAAAAAECAwAEEQUhEhMxUSJBcYEUQmGRIzLRBhUzUqGx4fAkQ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|
|
|
1
|
-
# Help
|
|
1
|
+
# spi3der · Help
|
|
2
|
+
|
|
3
|
+
Powered by **3Draft**. The `spider-paint`, `spi3der` and `3Draft` repositories remain independent projects.
|
|
4
|
+
|
|
2
5
|
|
|
3
6
|
A minimal 3D scene builder. Fly through a scene, build with solid prisms, and edit them like a woodworker: saw, move, scale, extrude. This page is `help.md`; edit that file and the panel follows.
|
|
4
7
|
|
package/index.html
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover, user-scalable=no">
|
|
6
|
-
<title>
|
|
6
|
+
<title>spi3der</title>
|
|
7
7
|
<link rel="icon" href="favicon.svg" type="image/svg+xml">
|
|
8
|
-
|
|
9
|
-
<link rel="apple-touch-icon" href="
|
|
8
|
+
|
|
9
|
+
<link rel="apple-touch-icon" href="favicon.svg">
|
|
10
10
|
<link rel="manifest" href="manifest.webmanifest">
|
|
11
11
|
<meta name="theme-color" content="#0b0b0a">
|
|
12
12
|
<meta name="mobile-web-app-capable" content="yes">
|
|
13
13
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
14
14
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
15
|
-
<meta name="apple-mobile-web-app-title" content="
|
|
15
|
+
<meta name="apple-mobile-web-app-title" content="spi3der">
|
|
16
16
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Barlow+Semi+Condensed:wght@600&family=DM+Mono:wght@400;500&display=swap">
|
|
17
17
|
<style>
|
|
18
18
|
/* Layout: one-screen instrument. Slim title bar, one square drawing stage, readout bar below. */
|
|
@@ -663,7 +663,7 @@
|
|
|
663
663
|
</head>
|
|
664
664
|
<body>
|
|
665
665
|
<header class="bar">
|
|
666
|
-
<h1>
|
|
666
|
+
<h1>spi3der<span>3Draft</span></h1>
|
|
667
667
|
<p class="build"><span id="fps" title="Frames drawn in the last second (– while nothing moves: a still picture is not redrawn)">–</span> <span id="build" title="Build, YY.MM.DD.NNN">–</span></p>
|
|
668
668
|
</header>
|
|
669
669
|
|
|
@@ -5276,6 +5276,13 @@
|
|
|
5276
5276
|
const res = await fetch('help.md');
|
|
5277
5277
|
if (!res.ok) throw new Error(res.status);
|
|
5278
5278
|
helpDoc.innerHTML = md(await res.text());
|
|
5279
|
+
const helpBrand = document.createElement('img');
|
|
5280
|
+
helpBrand.src = 'media/spi3der-brand.svg';
|
|
5281
|
+
helpBrand.alt = 'spi3der — full spider artwork';
|
|
5282
|
+
helpBrand.decoding = 'async';
|
|
5283
|
+
helpBrand.style.cssText = 'display:block;width:100%;max-width:720px;aspect-ratio:1;height:auto;object-fit:contain;margin:0 auto 24px;border-radius:16px';
|
|
5284
|
+
helpBrand.onerror = () => { helpBrand.src = 'favicon.svg'; };
|
|
5285
|
+
helpDoc.prepend(helpBrand);
|
|
5279
5286
|
helpLoaded = true;
|
|
5280
5287
|
} catch (err) {
|
|
5281
5288
|
helpDoc.textContent = `The help page could not be loaded (${err.message}).`;
|
package/manifest.webmanifest
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
3
|
-
"short_name": "
|
|
2
|
+
"name": "spi3der",
|
|
3
|
+
"short_name": "spi3der",
|
|
4
4
|
"description": "A 3D scene builder: fly, place, cut and paint low-poly models.",
|
|
5
5
|
"start_url": "./",
|
|
6
6
|
"scope": "./",
|
|
@@ -10,25 +10,7 @@
|
|
|
10
10
|
"theme_color": "#0b0b0a",
|
|
11
11
|
"icons": [
|
|
12
12
|
{
|
|
13
|
-
"src": "
|
|
14
|
-
"sizes": "192x192",
|
|
15
|
-
"type": "image/png",
|
|
16
|
-
"purpose": "any"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"src": "icons/icon-512.png",
|
|
20
|
-
"sizes": "512x512",
|
|
21
|
-
"type": "image/png",
|
|
22
|
-
"purpose": "any"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"src": "icons/icon-maskable-512.png",
|
|
26
|
-
"sizes": "512x512",
|
|
27
|
-
"type": "image/png",
|
|
28
|
-
"purpose": "maskable"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"src": "icons/icon.svg",
|
|
13
|
+
"src": "favicon.svg",
|
|
32
14
|
"sizes": "any",
|
|
33
15
|
"type": "image/svg+xml",
|
|
34
16
|
"purpose": "any"
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Bounded, privacy-preserving diagnostics for the spi3der MCP App.
|
|
2
|
+
// Never log arguments, scene meshes, URLs, tokens or raw exception stacks.
|
|
3
|
+
import { randomUUID } from 'node:crypto';
|
|
4
|
+
import { performance } from 'node:perf_hooks';
|
|
5
|
+
|
|
6
|
+
const MAX_TRACES = 128;
|
|
7
|
+
const TTL_MS = 15 * 60 * 1000;
|
|
8
|
+
const MAX_EVENTS = 48;
|
|
9
|
+
const traces = new Map();
|
|
10
|
+
const fields = new Set(['stepCount','objects','vertices','faces','payloadBytes','durationMs','phase','reason','httpStatus','widgetObjects','widgetFaces']);
|
|
11
|
+
const phases = new Set(['request_received','model_started','model_finished','scene_unpacked','response_ready','request_failed','widget_loaded','widget_rendered','widget_error','widget_empty']);
|
|
12
|
+
const number = value => typeof value === 'number' && Number.isFinite(value) ? Math.max(0, Math.round(value)) : undefined;
|
|
13
|
+
function trim() {
|
|
14
|
+
const now = Date.now();
|
|
15
|
+
for (const [id, t] of traces) if (now - t.createdMs > TTL_MS) traces.delete(id);
|
|
16
|
+
while (traces.size > MAX_TRACES) traces.delete(traces.keys().next().value);
|
|
17
|
+
}
|
|
18
|
+
function log(t, e) {
|
|
19
|
+
console.log(JSON.stringify({
|
|
20
|
+
severity: e.phase === 'request_failed' || e.phase === 'widget_error' ? 'ERROR' : 'INFO',
|
|
21
|
+
component: 'spi3der-mcp',
|
|
22
|
+
traceId: t.id,
|
|
23
|
+
phase: e.phase,
|
|
24
|
+
elapsedMs: e.elapsedMs,
|
|
25
|
+
...Object.fromEntries(Object.entries(e).filter(([k]) => fields.has(k))),
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
export function startTrace(stepCount = 0) {
|
|
29
|
+
trim();
|
|
30
|
+
const id = randomUUID();
|
|
31
|
+
const t = { id, createdMs: Date.now(), started: performance.now(), events: [], status: 'running' };
|
|
32
|
+
traces.set(id, t);
|
|
33
|
+
recordTrace(id, 'request_received', { stepCount });
|
|
34
|
+
return id;
|
|
35
|
+
}
|
|
36
|
+
export function recordTrace(id, phase, details = {}) {
|
|
37
|
+
trim();
|
|
38
|
+
const t = traces.get(id);
|
|
39
|
+
if (!t || !phases.has(phase)) return false;
|
|
40
|
+
const e = { phase, elapsedMs: Math.round(performance.now() - t.started) };
|
|
41
|
+
for (const [key, value] of Object.entries(details)) {
|
|
42
|
+
if (!fields.has(key)) continue;
|
|
43
|
+
if (key === 'reason') e.reason = String(value || 'unknown').slice(0, 64).replace(/[^\w .:-]/g, '_');
|
|
44
|
+
else if (key === 'phase') continue;
|
|
45
|
+
else { const n = number(value); if (n !== undefined) e[key] = n; }
|
|
46
|
+
}
|
|
47
|
+
t.events.push(e);
|
|
48
|
+
if (t.events.length > MAX_EVENTS) t.events.shift();
|
|
49
|
+
if (phase === 'response_ready') t.status = 'server_complete';
|
|
50
|
+
if (phase === 'request_failed') t.status = 'server_error';
|
|
51
|
+
if (phase === 'widget_rendered') t.status = 'widget_rendered';
|
|
52
|
+
if (phase === 'widget_error') t.status = 'widget_error';
|
|
53
|
+
log(t, e);
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
export function readTrace(id) {
|
|
57
|
+
trim();
|
|
58
|
+
if (typeof id !== 'string' || !/^[0-9a-f]{8}-[0-9a-f-]{27,}$/.test(id)) return null;
|
|
59
|
+
const t = traces.get(id);
|
|
60
|
+
if (!t) return null;
|
|
61
|
+
return {
|
|
62
|
+
trace_id: t.id,
|
|
63
|
+
status: t.status,
|
|
64
|
+
created_at: new Date(t.createdMs).toISOString(),
|
|
65
|
+
events: t.events.map(e => ({ ...e })),
|
|
66
|
+
note: 'Instance-local, expires after 15 minutes. Missing client events do not prove a client failure. Cloud Logging provides cross-instance correlation.',
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export function safeErrorCode(error) {
|
|
70
|
+
const s = String(error?.code || error?.name || 'Error');
|
|
71
|
+
return s.replace(/[^a-zA-Z0-9_:-]/g, '_').slice(0, 48) || 'Error';
|
|
72
|
+
}
|
package/mcp/workshop-app.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// ChatGPT/MCP Apps adapter. Lives in spi3der, not in the headless 3Draft kernel.
|
|
2
2
|
import { publicTools, unpack } from './http.js';
|
|
3
|
+
import { performance } from 'node:perf_hooks';
|
|
3
4
|
import { widgetHTML } from './workshop-widget.js';
|
|
5
|
+
import { startTrace, recordTrace, readTrace, safeErrorCode } from './diagnostics.js';
|
|
4
6
|
export const RESOURCE_URI='ui://spi3der/workshop-v1.html';
|
|
5
7
|
const displayTool={
|
|
6
8
|
name:'open_workshop',
|
|
@@ -8,36 +10,78 @@ const displayTool={
|
|
|
8
10
|
inputSchema:{type:'object',properties:{steps:{type:'array',items:{type:'object',properties:{tool:{type:'string'},args:{type:'object'}},required:['tool']}},from:{type:'string',description:'Previous build_model open_url or open_workshop open_url'}}},annotations:{readOnlyHint:false,openWorldHint:false},
|
|
9
11
|
_meta:{ui:{resourceUri:RESOURCE_URI},'openai/outputTemplate':RESOURCE_URI}
|
|
10
12
|
};
|
|
13
|
+
const debugTool={
|
|
14
|
+
name:'debug_trace',
|
|
15
|
+
description:'Inspect a recent spi3der MCP workshop trace by its unguessable trace_id. Returns timed server milestones and any reported widget milestones; no scene geometry or prompts. Traces expire after 15 minutes and are instance-local.',
|
|
16
|
+
inputSchema:{type:'object',properties:{trace_id:{type:'string',description:'trace_id returned by open_workshop'}},required:['trace_id']},
|
|
17
|
+
annotations:{readOnlyHint:true,openWorldHint:false}
|
|
18
|
+
};
|
|
19
|
+
const widgetEventTool={
|
|
20
|
+
name:'report_widget_event',
|
|
21
|
+
description:'Internal widget diagnostic event. Never use for normal model creation.',
|
|
22
|
+
inputSchema:{type:'object',properties:{trace_id:{type:'string'},phase:{type:'string',enum:['widget_loaded','widget_rendered','widget_error','widget_empty']},widgetObjects:{type:'number'},widgetFaces:{type:'number'}},required:['trace_id','phase']},
|
|
23
|
+
annotations:{readOnlyHint:false,openWorldHint:false}
|
|
24
|
+
};
|
|
11
25
|
const err=(id,code,message)=>({jsonrpc:'2.0',id,error:{code,message}});
|
|
12
26
|
const answer=(id,result)=>({jsonrpc:'2.0',id,result});
|
|
13
27
|
export async function handleWorkshopMcp(request,{origin,fetchText}) {
|
|
14
28
|
if(!request||Array.isArray(request)||request.jsonrpc!=='2.0'||typeof request.method!=='string')return err(request?.id??null,-32600,'invalid request');
|
|
15
29
|
const {id,method,params={}}=request;
|
|
16
30
|
if(id===undefined||id===null)return null;
|
|
17
|
-
if(method==='tools/list')return answer(id,{tools:[...publicTools().map(({name,description,inputSchema,annotations})=>({name,description,inputSchema,annotations})),displayTool]});
|
|
31
|
+
if(method==='tools/list')return answer(id,{tools:[...publicTools().map(({name,description,inputSchema,annotations})=>({name,description,inputSchema,annotations})),displayTool,debugTool,widgetEventTool]});
|
|
18
32
|
if(method==='resources/list')return answer(id,{resources:[{uri:RESOURCE_URI,name:'spi3der 3D Workshop',mimeType:'text/html;profile=mcp-app',description:'Interactive 3D scene embedded in the conversation'}]});
|
|
19
33
|
if(method==='resources/read'){
|
|
20
34
|
if(params.uri!==RESOURCE_URI)return err(id,-32002,'resource not found');
|
|
35
|
+
console.log(JSON.stringify({severity:'INFO',component:'spi3der-mcp',phase:'resource_read',resource:'workshop-v1',payloadBytes:Buffer.byteLength(widgetHTML)}));
|
|
21
36
|
return answer(id,{contents:[{uri:RESOURCE_URI,mimeType:'text/html;profile=mcp-app',text:widgetHTML}]});
|
|
22
37
|
}
|
|
23
38
|
if(method==='initialize'){
|
|
24
39
|
return answer(id,{protocolVersion:params.protocolVersion||'2025-06-18',capabilities:{tools:{},resources:{listChanged:false}},serverInfo:{name:'spi3der',title:'spi3der',version:'26.11.20005'},instructions:'spi3der is a ChatGPT-native 3D workshop. Use open_workshop to render the scene inline, not links to another browser tab. The headless 3Draft engine supplies geometries.'});
|
|
25
40
|
}
|
|
41
|
+
if(method==='tools/call'&¶ms.name==='debug_trace'){
|
|
42
|
+
const trace=readTrace(params.arguments?.trace_id);
|
|
43
|
+
return answer(id,{content:[{type:'text',text:JSON.stringify(trace || {status:'not_found_or_expired'})}]});
|
|
44
|
+
}
|
|
45
|
+
if(method==='tools/call'&¶ms.name==='report_widget_event'){
|
|
46
|
+
const args=params.arguments||{};
|
|
47
|
+
const allowed=['widget_loaded','widget_rendered','widget_error','widget_empty'];
|
|
48
|
+
const accepted=allowed.includes(args.phase) && recordTrace(args.trace_id,args.phase,{
|
|
49
|
+
widgetObjects:args.widgetObjects,widgetFaces:args.widgetFaces
|
|
50
|
+
});
|
|
51
|
+
return answer(id,{content:[{type:'text',text:JSON.stringify({accepted})}]});
|
|
52
|
+
}
|
|
26
53
|
if(method==='tools/call'&¶ms.name==='open_workshop'){
|
|
54
|
+
const args=params.arguments||{};
|
|
55
|
+
const trace_id=startTrace(Array.isArray(args.steps)?args.steps.length:0);
|
|
56
|
+
const started=performance.now();
|
|
27
57
|
try{
|
|
28
58
|
const modelTool=publicTools().find(t=>t.name==='build_model');
|
|
29
|
-
|
|
59
|
+
recordTrace(trace_id,'model_started');
|
|
30
60
|
const out=await modelTool.run({steps:args.steps||[],from:args.from,render:'none'},{origin,fetchText});
|
|
31
|
-
|
|
61
|
+
recordTrace(trace_id,'model_finished',{durationMs:performance.now()-started,objects:out.objects||0});
|
|
62
|
+
if(out.failed) {
|
|
63
|
+
recordTrace(trace_id,'request_failed',{reason:'model_step_failed'});
|
|
64
|
+
return answer(id,{isError:true,content:[{type:'text',text:JSON.stringify({trace_id,error:'model_step_failed',steps:out.steps})}]});
|
|
65
|
+
}
|
|
32
66
|
const packed=/#scene=([A-Za-z0-9_-]+)/.exec(out.open_url||'')?.[1];
|
|
33
67
|
if(!packed)throw Error('scene too large for the stateless preview');
|
|
34
68
|
const scene=unpack(packed);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
69
|
+
const objects=scene?.objects||[];
|
|
70
|
+
const vertices=objects.reduce((n,o)=>n+(o.mesh?.positions?.length||0),0);
|
|
71
|
+
const faces=objects.reduce((n,o)=>n+(o.mesh?.faces?.length||0),0);
|
|
72
|
+
recordTrace(trace_id,'scene_unpacked',{objects:objects.length,vertices,faces});
|
|
73
|
+
const result={
|
|
74
|
+
structuredContent:{scene,open_url:out.open_url,revision:1,trace_id},
|
|
75
|
+
content:[{type:'text',text:JSON.stringify({trace_id,objects:out.objects,open_url:out.open_url,steps:out.steps})}],
|
|
76
|
+
_meta:{ui:{resourceUri:RESOURCE_URI},'openai/outputTemplate':RESOURCE_URI,'spi3der/trace_id':trace_id}
|
|
77
|
+
};
|
|
78
|
+
const payloadBytes=Buffer.byteLength(JSON.stringify(result));
|
|
79
|
+
recordTrace(trace_id,'response_ready',{payloadBytes,durationMs:performance.now()-started});
|
|
80
|
+
return answer(id,result);
|
|
81
|
+
}catch(e){
|
|
82
|
+
recordTrace(trace_id,'request_failed',{reason:safeErrorCode(e),durationMs:performance.now()-started});
|
|
83
|
+
return answer(id,{isError:true,content:[{type:'text',text:JSON.stringify({trace_id,error:'workshop_failed',reason:safeErrorCode(e)})}]});
|
|
84
|
+
}
|
|
41
85
|
}
|
|
42
86
|
return undefined;
|
|
43
87
|
}
|
package/mcp/workshop-widget.js
CHANGED
|
@@ -9,13 +9,31 @@ canvas{width:100%;height:100%;display:block;touch-action:none}
|
|
|
9
9
|
.info{position:absolute;left:12px;bottom:10px;pointer-events:none;color:#a0b3bb;text-shadow:0 1px 2px #000}
|
|
10
10
|
#name{position:absolute;top:10px;left:12px;color:#ddecef;pointer-events:none}
|
|
11
11
|
</style></head><body><div id="viewport">
|
|
12
|
-
<canvas id="c"></canvas><span id="name">spi3der ·
|
|
12
|
+
<canvas id="c"></canvas><span id="name">spi3der · 3Draft workshop</span>
|
|
13
13
|
<div class="info">Drag to orbit · Scroll to zoom · Independent camera</div>
|
|
14
14
|
</div>
|
|
15
15
|
<script>
|
|
16
16
|
(()=>{
|
|
17
17
|
const canvas=document.getElementById('c'),ctx=canvas.getContext('2d');
|
|
18
18
|
let scene=window.openai?.toolOutput?.scene || {objects:[]};
|
|
19
|
+
let activeTrace=null, reportedRender=false;
|
|
20
|
+
// The ChatGPT host may not expose callTool to an embedded MCP App.
|
|
21
|
+
// If unavailable, retain console milestones; server traces explicitly show
|
|
22
|
+
// that widget confirmation was not received (not that rendering failed).
|
|
23
|
+
function report(phase, counts={}){
|
|
24
|
+
const id=activeTrace;
|
|
25
|
+
if(!id)return;
|
|
26
|
+
console.debug('[spi3der widget]',id,phase,counts);
|
|
27
|
+
try {
|
|
28
|
+
const send=window.openai?.callTool;
|
|
29
|
+
if(typeof send==='function'){
|
|
30
|
+
Promise.resolve(send.call(window.openai,'report_widget_event',{
|
|
31
|
+
trace_id:id,phase,widgetObjects:counts.objects||0,widgetFaces:counts.faces||0
|
|
32
|
+
})).catch(()=>{});
|
|
33
|
+
}
|
|
34
|
+
}catch(_ignored){}
|
|
35
|
+
}
|
|
36
|
+
|
|
19
37
|
let yaw=.65,pitch=.36,zoom=1,pan=[0,0,0],initial=true;
|
|
20
38
|
const clamp=(n,a,b)=>Math.max(a,Math.min(b,n));
|
|
21
39
|
const color=s=>/^#[0-9a-f]{3,8}$/i.test(s||'')?s:'#789aa5';
|
|
@@ -30,6 +48,7 @@ function geometry(){
|
|
|
30
48
|
return {center,r:Math.max(1,Math.hypot(...high.map((n,i)=>n-low[i])))};
|
|
31
49
|
}
|
|
32
50
|
function draw(){
|
|
51
|
+
try{
|
|
33
52
|
const box=canvas.getBoundingClientRect(),dpr=Math.min(devicePixelRatio||1,2);
|
|
34
53
|
canvas.width=Math.max(1,Math.round(box.width*dpr));canvas.height=Math.max(1,Math.round(box.height*dpr));
|
|
35
54
|
ctx.setTransform(dpr,0,0,dpr,0,0);const w=box.width,h=box.height;
|
|
@@ -51,6 +70,14 @@ function draw(){
|
|
|
51
70
|
ctx.lineJoin='round';
|
|
52
71
|
for(const p of polygons){ctx.beginPath();p.v.forEach((v,i)=>i?ctx.lineTo(v[0],v[1]):ctx.moveTo(v[0],v[1]));ctx.closePath();ctx.fillStyle=p.c;ctx.fill();ctx.strokeStyle='#11191f';ctx.lineWidth=Math.max(.65,1/zoom);ctx.stroke()}
|
|
53
72
|
if(!polygons.length){ctx.textAlign='center';ctx.fillStyle='#829aa6';ctx.fillText('Empty 3D scene',w/2,h/2)}
|
|
73
|
+
if(activeTrace&&!reportedRender){
|
|
74
|
+
reportedRender=true;
|
|
75
|
+
report(polygons.length?'widget_rendered':'widget_empty',{objects:all().length,faces:polygons.length});
|
|
76
|
+
}
|
|
77
|
+
}catch(e){
|
|
78
|
+
report('widget_error');
|
|
79
|
+
console.error('[spi3der widget render]',e);
|
|
80
|
+
}
|
|
54
81
|
}
|
|
55
82
|
let last=null;
|
|
56
83
|
canvas.addEventListener('pointerdown',e=>{last=[e.clientX,e.clientY];canvas.setPointerCapture(e.pointerId)});
|
|
@@ -60,8 +87,13 @@ canvas.addEventListener('pointercancel',()=>last=null);
|
|
|
60
87
|
canvas.addEventListener('wheel',e=>{e.preventDefault();zoom=clamp(zoom*Math.exp(e.deltaY*.001),.12,20);draw()},{passive:false});
|
|
61
88
|
new ResizeObserver(draw).observe(document.getElementById('viewport'));
|
|
62
89
|
const newScene=()=>{
|
|
63
|
-
const
|
|
64
|
-
|
|
90
|
+
const output=window.openai?.toolOutput || window.openai?.toolResponse?.structuredContent;
|
|
91
|
+
const value=output?.scene;
|
|
92
|
+
if(value){
|
|
93
|
+
const nextTrace=output?.trace_id||null;
|
|
94
|
+
if(nextTrace!==activeTrace){activeTrace=nextTrace;reportedRender=false;report('widget_loaded')}
|
|
95
|
+
scene=value;draw();
|
|
96
|
+
}
|
|
65
97
|
};
|
|
66
98
|
window.addEventListener('openai:set_globals',newScene);
|
|
67
99
|
newScene();draw();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><image width="640" height="640" href="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADrbWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAAAAAAAOcGl0bQAAAAAAAQAAAB5pbG9jAAAAAEQAAAEAAQAAAAEAAAETAAAZ4wAAAChpaW5mAAAAAAABAAAAGmluZmUCAAAAAAEAAGF2MDFDb2xvcgAAAABqaXBycAAAAEtpcGNvAAAAFGlzcGUAAAAAAAACgAAAAoAAAAAQcGl4aQAAAAADCAgIAAAADGF2MUOBBAwAAAAAE2NvbHJuY2x4AAEADQAGgAAAABdpcG1hAAAAAAAAAAEAAQQBAoMEAAAZ621kYXQSAAoKGSZn+f2iAhoNCDLSM0ZdB4eFndhhhgLFVYAA2QzPyikP6dvByQpxZlu1A2vE+d0gjL8JyLBsbqW/RcBQRoE4LFZHpaE6WpAqYBPJvDl1YHqiC43qqWbRpMupKSoUJPBMMNs56aT50QXS9eVCMUe76mxVUnr62oWh75eqmNov1rpT4BicahDbkuruLqyH8lYThQYW64Fh8L3VIYW9CieTgHLJBc8gkAR2boQM2ZaEUbW5cq25l9HdxCtdqK+ufOjSJgS0uKmT0QxNCthZWC+ywEfhESToQo9sVF5DPpB1VTsXk8ukgMGGdz8QKH3siPKQ66GklP0q4a4uUychgPwsO0SSTrs/ibUXKnCN7YhrIjmJDue2Z5lvGTmuso3L3fsAF9FktqCYjy7aJZLlNB+sy25waE6os69DHy5jjlexSdHKcQQ9ibtnZKc/us7BlK/HfOgKiXxQBezyckao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68tEpF6sLiYZSZ116/sUZQlf5DLLki8KA8h7T3yMaLaEoB+YsZmb3hOnnp2crNCZgHvucnVBVoMvcj+slEy/bpIewb18aY5toA7q3MaaeUvvQcZ9JF8V70tmg9eEpxhmjYGn4ynuZJyNGdfKbVNOokGpHDMHnAjCsHowMfduYO+MQBu53U7WgOjeoiGZy/PSplAahpqC0pX8b0iPetGOV64wA+3OrLdpD+p3gPPWPW/uB2U6ysZ24SZW++UytaoP3Szcz3iA3r1+QTuZwdQ1kfZYulBlsEwgs7XB5QClK3bl1GfhFtfO7q0GDJcSfe1+aDK5JvjP4ks8pil7xdKulmaxappfnQz9hoMJhrdnhZxZCdvC2rA2Yj9AjNL3pnjHsP8lAh3qY9jWYQWTWn0OwiV85Gt3afMW7Kg4HiWkuRIsQ2sctzrorDP98hc/m6Fcs4yUO1OpJOrhgsvSAeZdg0QZVqo6N6yGU1SBqKG4gqjx4E+RVHOEjG1eNw4o8/u6X8WG7KQ+w0DJeI+mf66zzI18AQihe8xlvJrJoG7TBxhUot8lu20r3ugT1VhvDEuMhxBEpSPo0oFXrpPg5eOCFLjTpVG084mhR17gVmxZ78kS4wTXqP3572Nletdnb79tTe1bdNkDslJ9nmibTth/wl0jz9S5wAW8KGTkabhfxpyVfAUgMig1COOD0v/FKVUzxGUqivyh1qp4PqbS3R0Se5JZjaIQhW22xHX3PampLVCX7ARjUyBqgcB6RDuAB8YsGNxow9OSzhqx7+20jvuK9HIQ4mFIREX3sIoqwBTBAqnBfLjvr8hg="/></svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spi3der",
|
|
3
|
-
"version": "26.11.
|
|
3
|
+
"version": "26.11.21002",
|
|
4
4
|
"description": "Browser-native 3D scene building, WebXR and ViRtuSH, based on 3Draft",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
"workshop": "node bin/workshop.mjs",
|
|
16
16
|
"test:workshop": "node tests/workshop.mjs",
|
|
17
17
|
"mcp:workshop": "node bin/workshop-mcp.mjs",
|
|
18
|
-
"test:mcp-app": "node tests/mcp-app.mjs"
|
|
18
|
+
"test:mcp-app": "node tests/mcp-app.mjs",
|
|
19
|
+
"release": "node scripts/release.mjs",
|
|
20
|
+
"prepublishOnly": "node scripts/check-publish.mjs"
|
|
19
21
|
},
|
|
20
22
|
"files": [
|
|
21
23
|
"api/",
|
package/sw.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
//
|
|
1
|
+
// spi3der service worker: the app works offline once it has been opened.
|
|
2
2
|
// The page, models and icons come from the cache first and are refreshed in the background;
|
|
3
3
|
// the engine (pinned to one commit on jsDelivr, so it never changes) and the fonts are kept after the first visit.
|
|
4
|
-
const CACHE = 'spi3der-
|
|
5
|
-
const SHELL = ['./', 'index.html', 'manifest.webmanifest', 'favicon.svg', '
|
|
4
|
+
const CACHE = 'spi3der-v3';
|
|
5
|
+
const SHELL = ['./', 'index.html', 'manifest.webmanifest', 'favicon.svg', 'media/spi3der-brand.svg', 'help.md', 'sky.html', 'sky.md', 'models/globe.scene.json', 'models/deepsky.scene.json', 'models/deepsky-lark.scene.json', 'models/lark-4.scene.json', 'models/lark.game.json', 'models/spider-build-v2.mjs'];
|
|
6
6
|
|
|
7
7
|
self.addEventListener('install', (e) => {
|
|
8
8
|
e.waitUntil(caches.open(CACHE).then((c) => c.addAll(SHELL)).then(() => self.skipWaiting()));
|