File size: 1,314 Bytes
90d354b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Diagnostic binding only: all three selected camera views are treated as the entrance ROI.
// This does not rewrite the user's saved tasks or claim full-view presence proves identity.
import fs from 'node:fs'
import path from 'node:path'
const out=path.resolve('../output/kimi-jev-evaluation-20261013')
const atomic=JSON.parse(fs.readFileSync(path.join(out,'plans/A01.json'),'utf8')).plan.observers[0]
fs.mkdirSync(path.join(out,'plans-bound'),{recursive:true})
for(const id of ['G14','G15','G16']){
 const original=JSON.parse(fs.readFileSync(path.join(out,'plans',id+'.json'),'utf8'))
 const result=structuredClone(original)
 const observer=result.plan.observers.find(o=>o.id==='q1')
 Object.assign(observer,{question_en:atomic.question_en,options:atomic.options,labels_zh:atomic.labels_zh,input:'single'})
 result.binding={version:'diagnostic-person-visible-v1',originalPlan:'plans/'+id+'.json',observerSource:'plans/A01.json',scope:'The selected entrance view is the observation ROI; no automatic ROI selection or person identity tracking.',edited:['observers.q1.question_en','observers.q1.options','observers.q1.labels_zh'],rulesUnchanged:true}
 fs.writeFileSync(path.join(out,'plans-bound',id+'.json'),JSON.stringify(result,null,2))
}
console.log('Prepared three separately versioned diagnostic bindings.')