main
MartyPM Bridge runtime manifest, source, tests and showcase for 0.1.0 d2ae474
#!/usr/bin/env node
'use strict';
// A stand-in for the SolidCraft app: after a short delay it opens the control port, like the
// real app with "Let AI agents connect" ticked. MOCK_APP_NO_AGENTS=1 never opens it.
const net = require('net');
const port = parseInt(process.env.SOLIDCRAFT_CONTROL_PORT, 10);
if (process.env.MOCK_APP_NO_AGENTS === '1') setTimeout(() => process.exit(0), 20000);
else setTimeout(() => net.createServer((s) => s.end()).listen(port, '127.0.0.1'), 1500);
setTimeout(() => process.exit(0), 60000);