Initial Commit

This commit is contained in:
jb
2026-09-18 23:15:05 -04:00
commit fdcc4863f5
118 changed files with 16868 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import assert from 'node:assert/strict';
const base = process.env.SMOKE_WEB_BASE ?? 'http://localhost:15173';
const root = await fetch(base); assert.equal(root.status, 200);
assert((await root.text()).includes('FIXTURE DEMO'));
const characters = await fetch(`${base}/characters`); assert.equal(characters.status, 200);
assert((await characters.text()).includes('Fixture Pilot 1'));
const assets = await fetch(`${base}/assets`); assert.equal(assets.status, 200);
const html = await assets.text(); assert(html.includes('2,086,000.00'));
assert(html.includes('Unpriced'));
const request = (message: string, origin = base) => fetch(`${base}/api/chat`, { method: 'POST', headers: { origin, 'content-type': 'application/json' }, body: JSON.stringify({ message, requestId: crypto.randomUUID() }) });
for (const command of ['/value', '/assets']) {
const response = await request(command); assert.equal(response.status, 200);
const result = await response.json(); assert.equal(result.status, 'ready');
assert.equal(result.operation.report.total, '208600000');
assert.equal(result.operation.report.characters.length, 2);
assert.equal(result.operation.report.unpricedItems, 2);
}
assert.equal((await request('/value', 'https://untrusted.example')).status, 403);
assert.equal((await request('x'.repeat(20_000))).status, 413);
console.log('Production fixture smoke passed: SSR assistant/characters/assets, shared chat/browse totals, exclusions, CSRF and body limits.');