dsh-mutipleagent 0.0.0-stage → 0.4.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/CHANGELOG.md +214 -0
- package/CONTRIBUTING.md +49 -0
- package/LICENSE +21 -0
- package/README.en.md +125 -0
- package/README.md +302 -2
- package/SECURITY.md +27 -0
- package/THIRD_PARTY_NOTICES.md +29 -0
- package/assets/agents/MAGPIE-LICENSE +21 -0
- package/assets/agents/README.md +47 -0
- package/assets/agents/antigravity.png +0 -0
- package/assets/agents/claude.png +0 -0
- package/assets/agents/codex.png +0 -0
- package/assets/agents/copilot.svg +1 -0
- package/assets/agents/dsh.svg +1 -0
- package/assets/agents/gemini.png +0 -0
- package/assets/agents/grok.svg +1 -0
- package/assets/agents/hermes.svg +1 -0
- package/assets/agents/kimi.svg +1 -0
- package/assets/agents/omp.svg +7 -0
- package/assets/agents/opencode.svg +1 -0
- package/assets/agents/pi.svg +1 -0
- package/assets/kenney/LICENSE-furniture-kit.txt +23 -0
- package/assets/kenney/LICENSE-mini-characters.txt +28 -0
- package/assets/kenney/characters/Textures/colormap.png +0 -0
- package/assets/kenney/characters/character-female-a.glb +0 -0
- package/assets/kenney/characters/character-female-b.glb +0 -0
- package/assets/kenney/characters/character-female-c.glb +0 -0
- package/assets/kenney/characters/character-female-d.glb +0 -0
- package/assets/kenney/characters/character-female-e.glb +0 -0
- package/assets/kenney/characters/character-female-f.glb +0 -0
- package/assets/kenney/characters/character-male-a.glb +0 -0
- package/assets/kenney/characters/character-male-b.glb +0 -0
- package/assets/kenney/characters/character-male-c.glb +0 -0
- package/assets/kenney/characters/character-male-d.glb +0 -0
- package/assets/kenney/characters/character-male-e.glb +0 -0
- package/assets/kenney/characters/character-male-f.glb +0 -0
- package/assets/kenney/furniture/benchCushion.glb +0 -0
- package/assets/kenney/furniture/bookcaseOpen.glb +0 -0
- package/assets/kenney/furniture/books.glb +0 -0
- package/assets/kenney/furniture/cabinetTelevision.glb +0 -0
- package/assets/kenney/furniture/cardboardBoxClosed.glb +0 -0
- package/assets/kenney/furniture/chairCushion.glb +0 -0
- package/assets/kenney/furniture/chairDesk.glb +0 -0
- package/assets/kenney/furniture/chairModernCushion.glb +0 -0
- package/assets/kenney/furniture/coatRackStanding.glb +0 -0
- package/assets/kenney/furniture/computerKeyboard.glb +0 -0
- package/assets/kenney/furniture/computerMouse.glb +0 -0
- package/assets/kenney/furniture/computerScreen.glb +0 -0
- package/assets/kenney/furniture/desk.glb +0 -0
- package/assets/kenney/furniture/doorway.glb +0 -0
- package/assets/kenney/furniture/kitchenBar.glb +0 -0
- package/assets/kenney/furniture/kitchenCabinet.glb +0 -0
- package/assets/kenney/furniture/kitchenCoffeeMachine.glb +0 -0
- package/assets/kenney/furniture/kitchenFridgeLarge.glb +0 -0
- package/assets/kenney/furniture/kitchenMicrowave.glb +0 -0
- package/assets/kenney/furniture/kitchenSink.glb +0 -0
- package/assets/kenney/furniture/lampRoundFloor.glb +0 -0
- package/assets/kenney/furniture/lampSquareTable.glb +0 -0
- package/assets/kenney/furniture/laptop.glb +0 -0
- package/assets/kenney/furniture/loungeChairRelax.glb +0 -0
- package/assets/kenney/furniture/loungeSofa.glb +0 -0
- package/assets/kenney/furniture/plantSmall1.glb +0 -0
- package/assets/kenney/furniture/plantSmall2.glb +0 -0
- package/assets/kenney/furniture/plantSmall3.glb +0 -0
- package/assets/kenney/furniture/pottedPlant.glb +0 -0
- package/assets/kenney/furniture/radio.glb +0 -0
- package/assets/kenney/furniture/rugRectangle.glb +0 -0
- package/assets/kenney/furniture/rugRound.glb +0 -0
- package/assets/kenney/furniture/sideTable.glb +0 -0
- package/assets/kenney/furniture/speaker.glb +0 -0
- package/assets/kenney/furniture/stoolBar.glb +0 -0
- package/assets/kenney/furniture/table.glb +0 -0
- package/assets/kenney/furniture/tableCoffee.glb +0 -0
- package/assets/kenney/furniture/tableRound.glb +0 -0
- package/assets/kenney/furniture/televisionModern.glb +0 -0
- package/assets/kenney/furniture/toaster.glb +0 -0
- package/assets/kenney/furniture/trashcan.glb +0 -0
- package/assets/kenney/furniture/wallWindow.glb +0 -0
- package/assets/logo.svg +12 -0
- package/assets/scene-icons/arcade.png +0 -0
- package/assets/scene-icons/cafe.png +0 -0
- package/assets/scene-icons/castle.png +0 -0
- package/assets/scene-icons/christmas.png +0 -0
- package/assets/scene-icons/graveyard.png +0 -0
- package/assets/scene-icons/map.png +0 -0
- package/assets/scene-icons/office.png +0 -0
- package/assets/scene-icons/pirate.png +0 -0
- package/assets/scene-icons/station.png +0 -0
- package/assets/scenes/arcade.jpg +0 -0
- package/assets/scenes/cafe.jpg +0 -0
- package/assets/scenes/castle.jpg +0 -0
- package/assets/scenes/christmas.jpg +0 -0
- package/assets/scenes/graveyard.jpg +0 -0
- package/assets/scenes/office.jpg +0 -0
- package/assets/scenes/pirate.jpg +0 -0
- package/assets/scenes/station.jpg +0 -0
- package/client.js +144 -0
- package/cordis.patch.yml +3 -0
- package/harness.cjs +49 -0
- package/package.json +89 -4
- package/public/app.js +1 -0
- package/public/chunks/chunk-MU3LEDFF.js +4305 -0
- package/public/demo-icons/arrow-counterclockwise.svg +4 -0
- package/public/demo-icons/arrow-right.svg +3 -0
- package/public/demo-icons/bell.svg +3 -0
- package/public/demo-icons/box-seam-fill.svg +3 -0
- package/public/demo-icons/chat-left-text-fill.svg +3 -0
- package/public/demo-icons/check-lg.svg +3 -0
- package/public/demo-icons/chevron-down.svg +3 -0
- package/public/demo-icons/cpu-fill.svg +4 -0
- package/public/demo-icons/crosshair.svg +3 -0
- package/public/demo-icons/diagram-3-fill.svg +3 -0
- package/public/demo-icons/file-earmark-code-fill.svg +3 -0
- package/public/demo-icons/fullscreen.svg +3 -0
- package/public/demo-icons/pause-fill.svg +3 -0
- package/public/demo-icons/people-fill.svg +3 -0
- package/public/demo-icons/pie-chart-fill.svg +3 -0
- package/public/demo-icons/play-fill.svg +3 -0
- package/public/demo-icons/search.svg +3 -0
- package/public/demo-icons/shield-check.svg +4 -0
- package/public/demo-icons/stack.svg +4 -0
- package/public/demo-icons/x-lg.svg +3 -0
- package/public/demo.css +225 -0
- package/public/demo.html +67 -0
- package/public/demo.js +7 -0
- package/public/index.html +59 -0
- package/public/style.css +15 -0
- package/public/vendor/office.js +1631 -0
- package/src/codex.js +674 -0
- package/src/demo.js +103 -0
- package/src/harness-watcher.js +584 -0
- package/src/server.js +239 -0
- package/vendor/licenses/BOOTSTRAP-ICONS-LICENSE.txt +21 -0
- package/vendor/licenses/ESBUILD-LICENSE.txt +21 -0
- package/vendor/licenses/MESHOPTIMIZER-LICENSE.txt +22 -0
- package/vendor/licenses/PLAYWRIGHT-LICENSE.txt +202 -0
- package/vendor/licenses/PLAYWRIGHT-NOTICE.txt +5 -0
- package/vendor/licenses/THREE-LICENSE.txt +21 -0
package/src/server.js
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const http = require('node:http');
|
|
3
|
+
const fs = require('node:fs');
|
|
4
|
+
const path = require('node:path');
|
|
5
|
+
const zlib = require('node:zlib');
|
|
6
|
+
const { spawn } = require('node:child_process');
|
|
7
|
+
const { CodexWatcher } = require('./codex');
|
|
8
|
+
const { version: VERSION } = require('../package.json');
|
|
9
|
+
|
|
10
|
+
const ROOT = path.resolve(__dirname, '..');
|
|
11
|
+
const MIME = {
|
|
12
|
+
'.html': 'text/html; charset=utf-8',
|
|
13
|
+
'.js': 'text/javascript; charset=utf-8',
|
|
14
|
+
'.css': 'text/css; charset=utf-8',
|
|
15
|
+
'.png': 'image/png',
|
|
16
|
+
'.svg': 'image/svg+xml',
|
|
17
|
+
'.glb': 'model/gltf-binary',
|
|
18
|
+
'.ico': 'image/x-icon',
|
|
19
|
+
};
|
|
20
|
+
// 只压缩文本产物;GLB 本身已是压缩格式。
|
|
21
|
+
const COMPRESSIBLE = new Set(['.html', '.js', '.css', '.svg', '.json']);
|
|
22
|
+
const GZIP_CACHE_BYTES = 32 * 1024 * 1024;
|
|
23
|
+
const json = (res, status, data) => {
|
|
24
|
+
res.writeHead(status, { 'content-type': 'application/json; charset=utf-8' });
|
|
25
|
+
res.end(JSON.stringify(data));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
function createOfficeServer({ watcher = new CodexWatcher(), basePath = '', defaultDocument = 'index.html', authorize } = {}) {
|
|
29
|
+
const clients = new Set();
|
|
30
|
+
const startedAt = Date.now();
|
|
31
|
+
const gzipCache = new Map();
|
|
32
|
+
let gzipBytes = 0;
|
|
33
|
+
const remember = (key, buffer) => {
|
|
34
|
+
if (gzipBytes + buffer.length > GZIP_CACHE_BYTES) return;
|
|
35
|
+
gzipCache.set(key, buffer);
|
|
36
|
+
gzipBytes += buffer.length;
|
|
37
|
+
};
|
|
38
|
+
const server = http.createServer();
|
|
39
|
+
const handleRequest = async (req, res) => {
|
|
40
|
+
res.setHeader('cache-control', 'no-store');
|
|
41
|
+
res.setHeader('x-content-type-options', 'nosniff');
|
|
42
|
+
res.setHeader('referrer-policy', 'no-referrer');
|
|
43
|
+
res.setHeader('permissions-policy', 'camera=(), microphone=(), geolocation=(), payment=(), usb=()');
|
|
44
|
+
res.setHeader('cross-origin-resource-policy', 'same-origin');
|
|
45
|
+
res.setHeader(
|
|
46
|
+
'content-security-policy',
|
|
47
|
+
"default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; style-src 'self'; img-src 'self' data: blob:; connect-src 'self' blob:; object-src 'none'; form-action 'none'; frame-ancestors " +
|
|
48
|
+
(basePath ? "'self'" : "'none'") +
|
|
49
|
+
"; base-uri 'none'",
|
|
50
|
+
);
|
|
51
|
+
// 宿主挂载必须沿用其身份检查,不能把会话暴露为未鉴权的本机接口。
|
|
52
|
+
if (authorize) {
|
|
53
|
+
const rejection = authorize(req);
|
|
54
|
+
if (rejection !== undefined) return json(res, rejection, { error: '请从已登录的 Harness 窗口打开办公室' });
|
|
55
|
+
}
|
|
56
|
+
let host;
|
|
57
|
+
try {
|
|
58
|
+
host = new URL('http://' + req.headers.host);
|
|
59
|
+
} catch {
|
|
60
|
+
return json(res, 403, { error: '仅允许本机访问' });
|
|
61
|
+
}
|
|
62
|
+
if (!authorize && !['localhost', '127.0.0.1', '[::1]'].includes(host.hostname)) return json(res, 403, { error: '仅允许本机访问' });
|
|
63
|
+
if (!authorize && req.headers.origin && req.headers.origin !== host.origin) return json(res, 403, { error: '拒绝跨源请求' });
|
|
64
|
+
if (req.method !== 'GET') return json(res, 405, { error: '只读服务仅支持 GET' });
|
|
65
|
+
const url = new URL(req.url, host);
|
|
66
|
+
if (basePath) {
|
|
67
|
+
if (!url.pathname.startsWith(basePath + '/')) return json(res, 404, { error: '未找到资源' });
|
|
68
|
+
url.pathname = url.pathname.slice(basePath.length);
|
|
69
|
+
}
|
|
70
|
+
if (url.pathname === '/api/sessions' || url.pathname === '/events') {
|
|
71
|
+
const rootId = url.searchParams.get('rootId');
|
|
72
|
+
if (rootId && !watcher.select(rootId)) return json(res, 404, { error: '未找到该会话,请重新选择任务' });
|
|
73
|
+
if (url.pathname === '/api/sessions') {
|
|
74
|
+
// 轮询本身就是一次需求信号:没有 SSE 时也能读到最新状态。
|
|
75
|
+
if (typeof watcher.refresh === 'function') await watcher.refresh();
|
|
76
|
+
return json(res, 200, watcher.snapshot(rootId));
|
|
77
|
+
}
|
|
78
|
+
res.writeHead(200, { 'content-type': 'text/event-stream', connection: 'keep-alive' });
|
|
79
|
+
res.write('retry: 1500\n\n');
|
|
80
|
+
const client = { res, rootId, signature: '', release: watcher.subscribe?.(rootId || watcher.snapshot().rootId) };
|
|
81
|
+
clients.add(client);
|
|
82
|
+
watcher.setClients?.(clients.size);
|
|
83
|
+
push(client);
|
|
84
|
+
req.on('close', () => {
|
|
85
|
+
clients.delete(client);
|
|
86
|
+
client.release?.();
|
|
87
|
+
watcher.setClients?.(clients.size);
|
|
88
|
+
});
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (url.pathname === '/api/report') {
|
|
92
|
+
try {
|
|
93
|
+
const report = await watcher.fullText(url.searchParams.get('sessionId'), url.searchParams.get('eventId'));
|
|
94
|
+
return json(res, report ? 200 : 404, report || { error: '未找到该记录' });
|
|
95
|
+
} catch {
|
|
96
|
+
return json(res, 409, { error: '原始日志已改变或暂时无法读取,请刷新后重试' });
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (url.pathname === '/api/health') {
|
|
100
|
+
const snapshot = watcher.snapshot();
|
|
101
|
+
const status = typeof watcher.metrics === 'function' ? watcher.metrics() : {};
|
|
102
|
+
return json(res, 200, {
|
|
103
|
+
ok: true,
|
|
104
|
+
mode: snapshot.mode,
|
|
105
|
+
source: snapshot.source || snapshot.mode,
|
|
106
|
+
version: VERSION,
|
|
107
|
+
uptimeMs: Date.now() - startedAt,
|
|
108
|
+
clients: clients.size,
|
|
109
|
+
sessions: status.sessions ?? snapshot.roots?.length ?? 0,
|
|
110
|
+
members: status.members ?? snapshot.agents?.length ?? 0,
|
|
111
|
+
revision: status.revision ?? snapshot.revision ?? 0,
|
|
112
|
+
lastReadAt: status.lastReadAt ?? null,
|
|
113
|
+
lastReadMs: status.lastReadMs ?? 0,
|
|
114
|
+
reused: status.reused ?? 0,
|
|
115
|
+
interval: status.interval ?? null,
|
|
116
|
+
polling: status.polling ?? null,
|
|
117
|
+
warnings: snapshot.warnings?.length ?? 0,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
handleStatic(url, req, res);
|
|
121
|
+
};
|
|
122
|
+
const handleStatic = (url, req, res) => {
|
|
123
|
+
const asset = url.pathname.startsWith('/assets/');
|
|
124
|
+
const base = asset ? path.join(ROOT, 'assets') : path.join(ROOT, 'public');
|
|
125
|
+
let rel;
|
|
126
|
+
try {
|
|
127
|
+
rel = decodeURIComponent(asset ? url.pathname.slice(8) : url.pathname === '/' ? '/' + defaultDocument : url.pathname).replace(/^[/\\]+/, '');
|
|
128
|
+
} catch {
|
|
129
|
+
return json(res, 400, { error: '无效路径' });
|
|
130
|
+
}
|
|
131
|
+
const file = path.resolve(base, rel);
|
|
132
|
+
if (!file.startsWith(base + path.sep)) return json(res, 403, { error: '无效路径' });
|
|
133
|
+
const extension = path.extname(file).toLowerCase();
|
|
134
|
+
const type = MIME[extension];
|
|
135
|
+
if (!type) return json(res, 404, { error: '未找到资源' });
|
|
136
|
+
fs.stat(file, (err, st) => {
|
|
137
|
+
if (err || !st.isFile()) return json(res, 404, { error: '未找到资源' });
|
|
138
|
+
const etag = 'W/"' + st.size.toString(16) + '-' + Math.floor(st.mtimeMs).toString(16) + '"';
|
|
139
|
+
const headers = { 'content-type': type, 'cache-control': 'public, max-age=0, must-revalidate', etag };
|
|
140
|
+
const inm = req.headers['if-none-match'];
|
|
141
|
+
if (inm && inm.split(',').some(value => value.trim() === etag)) {
|
|
142
|
+
res.writeHead(304, headers);
|
|
143
|
+
return res.end();
|
|
144
|
+
}
|
|
145
|
+
const gzip = COMPRESSIBLE.has(extension) && /\bgzip\b/.test(req.headers['accept-encoding'] || '');
|
|
146
|
+
if (!gzip) {
|
|
147
|
+
res.writeHead(200, { ...headers, 'content-length': st.size });
|
|
148
|
+
const stream = fs.createReadStream(file);
|
|
149
|
+
stream.on('error', () => res.destroy());
|
|
150
|
+
return stream.pipe(res);
|
|
151
|
+
}
|
|
152
|
+
const key = file + '|' + st.size + '|' + Math.floor(st.mtimeMs);
|
|
153
|
+
const cached = gzipCache.get(key);
|
|
154
|
+
if (cached) {
|
|
155
|
+
res.writeHead(200, { ...headers, 'content-encoding': 'gzip', vary: 'accept-encoding', 'content-length': cached.length });
|
|
156
|
+
return res.end(cached);
|
|
157
|
+
}
|
|
158
|
+
fs.readFile(file, (readErr, buffer) => {
|
|
159
|
+
if (readErr) return res.destroy();
|
|
160
|
+
const packed = zlib.gzipSync(buffer, { level: 6 });
|
|
161
|
+
remember(key, packed);
|
|
162
|
+
res.writeHead(200, { ...headers, 'content-encoding': 'gzip', vary: 'accept-encoding', 'content-length': packed.length });
|
|
163
|
+
res.end(packed);
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
server.on('request', (req, res) => {
|
|
168
|
+
handleRequest(req, res).catch(() => {
|
|
169
|
+
if (res.headersSent) res.destroy();
|
|
170
|
+
else json(res, 500, { error: '办公室暂时无法读取数据,请重新连接' });
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
function push(c) {
|
|
175
|
+
const data = watcher.snapshot(c.rootId);
|
|
176
|
+
// 时间戳不参与比较,空闲时只发送心跳。
|
|
177
|
+
const signature = JSON.stringify({ ...data, updatedAt: 0 });
|
|
178
|
+
if (signature === c.signature || c.res.destroyed || c.res.writableLength > 1024 * 1024) return;
|
|
179
|
+
c.signature = signature;
|
|
180
|
+
c.res.write('data: ' + JSON.stringify(data) + '\n\n');
|
|
181
|
+
}
|
|
182
|
+
const broadcast = () => {
|
|
183
|
+
for (const c of clients) push(c);
|
|
184
|
+
};
|
|
185
|
+
watcher.on('change', broadcast);
|
|
186
|
+
const timer = setInterval(broadcast, 1000);
|
|
187
|
+
const ping = setInterval(() => {
|
|
188
|
+
for (const c of clients) c.res.write(': ping\n\n');
|
|
189
|
+
}, 15000);
|
|
190
|
+
timer.unref();
|
|
191
|
+
ping.unref();
|
|
192
|
+
server.on('close', () => {
|
|
193
|
+
clearInterval(timer);
|
|
194
|
+
clearInterval(ping);
|
|
195
|
+
watcher.off('change', broadcast);
|
|
196
|
+
for (const c of clients) {
|
|
197
|
+
c.release?.();
|
|
198
|
+
c.res.end();
|
|
199
|
+
}
|
|
200
|
+
clients.clear();
|
|
201
|
+
});
|
|
202
|
+
server.closeOffice = () => {
|
|
203
|
+
for (const c of clients) c.res.end();
|
|
204
|
+
server.close();
|
|
205
|
+
watcher.stop();
|
|
206
|
+
};
|
|
207
|
+
return server;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (require.main === module) {
|
|
211
|
+
const args = process.argv.slice(2);
|
|
212
|
+
const demo = args.includes('--demo');
|
|
213
|
+
const portArg = args.indexOf('--port');
|
|
214
|
+
const port = portArg < 0 ? 4317 : Number(args[portArg + 1]);
|
|
215
|
+
if (!Number.isInteger(port) || port < 0 || port > 65535) throw new Error('--port 必须是 0 到 65535 的整数');
|
|
216
|
+
const watcher = demo ? new (require('./demo').DemoWatcher)() : new CodexWatcher();
|
|
217
|
+
watcher.start();
|
|
218
|
+
const server = createOfficeServer({ watcher });
|
|
219
|
+
server.on('error', e => {
|
|
220
|
+
console.error('办公室启动失败:' + e.message);
|
|
221
|
+
watcher.stop();
|
|
222
|
+
process.exitCode = 1;
|
|
223
|
+
});
|
|
224
|
+
server.listen(port, '127.0.0.1', () => {
|
|
225
|
+
const url = 'http://127.0.0.1:' + server.address().port;
|
|
226
|
+
console.log('Codex 协作办公室 · ' + (demo ? '演示数据' : '真实日志,只读'));
|
|
227
|
+
console.log(url);
|
|
228
|
+
if (args.includes('--open')) {
|
|
229
|
+
const command = process.platform === 'win32' ? 'rundll32.exe' : process.platform === 'darwin' ? 'open' : 'xdg-open';
|
|
230
|
+
const openArgs = process.platform === 'win32' ? ['url.dll,FileProtocolHandler', url] : [url];
|
|
231
|
+
const child = spawn(command, openArgs, { detached: true, stdio: 'ignore', windowsHide: true });
|
|
232
|
+
child.on('error', () => console.error('无法自动打开浏览器,请手动访问上方地址。'));
|
|
233
|
+
child.unref();
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
process.on('SIGINT', () => server.closeOffice());
|
|
237
|
+
process.on('SIGTERM', () => server.closeOffice());
|
|
238
|
+
}
|
|
239
|
+
module.exports = { createOfficeServer };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019-2024 The Bootstrap 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,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Evan Wallace
|
|
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 all
|
|
13
|
+
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 THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016-2026 Arseny Kapoulkine
|
|
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 all
|
|
13
|
+
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 THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
@@ -0,0 +1,202 @@
|
|
|
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 purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the 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 owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Portions Copyright (c) Microsoft Corporation.
|
|
190
|
+
Portions Copyright 2017 Google Inc.
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -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.
|