返回 CodeWhale
workspace-audit-worker.js
根目录 / crates / plugins / assets / agent-teams / lib / workspace-audit-worker.js
1 /** Built worker entry: no Harness service instances cross the thread boundary. */
2 import { parentPort } from 'node:worker_threads';
3 import { auditTeamWorkspace } from "./workspace-audit.js";
4 parentPort?.on('message', (job) => {
5 try {
6 parentPort?.postMessage({ id: job.id, audit: auditTeamWorkspace(job.workspace, job.team) });
7 }
8 catch (error) {
9 parentPort?.postMessage({ id: job.id, error: String(error) });
10 }
11 });
12
12 lines JAVASCRIPT