/**
 * 无 UI 自检入口：可在 Node 下用 tsx 跑通 7 条演示脚本。
 * 用法（在 simple-platform-vue 目录）：npx tsx src/wcs-proto/selfcheck.ts
 */
import { createWorld } from './runtime/world'

const world = createWorld()
const results = world.runDemoScripts()
let failed = 0
for (const r of results) {
  const mark = r.ok ? 'PASS' : 'FAIL'
  console.log(`[${mark}] ${r.id} ${r.name}: ${r.detail}`)
  if (!r.ok) failed++
}
if (failed) {
  console.error(`\n${failed}/${results.length} failed`)
  process.exit(1)
}
console.log(`\nAll ${results.length} demo scripts passed.`)
