Publish war policy modules and refresh the JARVIS request catalogue

This commit is contained in:
Dev 2026-11-24 02:39:52 +01:00
commit e1edf7c3fc
3 changed files with 90 additions and 41 deletions

View file

@ -1,39 +1,39 @@
import {MASTER_KEY_TEMPLATES} from '../jarvis-master-keys.mjs';
export const KEY_GENERATOR_COMPONENTS=MASTER_KEY_TEMPLATES.map(t=>[t.label,t.actions.map(a=>a.label),[]]);
const el=(tag,text,cls)=>{const n=document.createElement(tag);if(text!==undefined)n.textContent=text;if(cls)n.className=cls;return n;};
export function createKeyGeneratorDesign({fetcher=fetch}={}){
const controller=new AbortController();let lookupController=null,lookupGeneration=0;let alive=true,busy=false,uncertain=false,issued=false,templates=MASTER_KEY_TEMPLATES,inputs=new Map(),issuedCode='',issueId=crypto.randomUUID(),redeemId=crypto.randomUUID();
const root=el('section',undefined,'jarvis-generator'),status=el('p','Opening the masterkey register…','codex-preview-notice');status.setAttribute('role','status');
const tabs=el('nav',undefined,'jarvis-generator-tabs'),main=el('div'),history=el('section',undefined,'codex-management-box');history.hidden=true;
const generateTab=el('button','Generate key'),historyTab=el('button','History');for(const b of [generateTab,historyTab])b.type='button';tabs.append(generateTab,historyTab);
const layout=el('div',undefined,'codex-management-grid'),form=el('form',undefined,'codex-management-box'),preview=el('aside',undefined,'codex-management-box');
function selectField(label){const l=el('label',undefined,'codex-field'),i=el('select');i.setAttribute('aria-label',label);l.append(el('span',label),i);return {label:l,input:i};}
const component=selectField('Master template'),action=selectField('Action'),top=el('div',undefined,'jarvis-generator-fields');top.append(component.label,action.label);
const recipient=el('p'),fields=el('div'),effect=el('p',undefined,'codex-seal-note'),targets=el('div');
const consent=el('label',undefined,'jarvis-generator-consent'),confirmed=el('input');confirmed.type='checkbox';consent.append(confirmed,el('span','I reviewed the exact scope and effect.'));
const generate=el('button','Generate key');generate.type='submit';generate.disabled=true;
const fresh=el('button','New instruction');fresh.type='button';fresh.hidden=true;
form.append(el('h3','Template & action'),top,recipient,targets,fields,effect,consent,generate,fresh);
const summary=el('dl',undefined,'jarvis-generator-summary'),output=el('code','Not issued'),copy=el('button','Copy key'),redeemForm=el('form'),redeemLabel=el('label',undefined,'codex-field'),codeInput=el('input'),redeem=el('button','Redeem key'),redeemConsent=el('label',undefined,'jarvis-generator-consent'),redeemCheck=el('input');
codeInput.type='text';codeInput.autocomplete='off';codeInput.maxLength=128;codeInput.required=true;redeemLabel.append(el('span','Key to redeem'),codeInput);redeemCheck.type='checkbox';redeemConsent.append(redeemCheck,el('span','Execute the instruction stored in this key.'));redeem.type='submit';copy.type='button';copy.disabled=true;redeem.disabled=true;redeemForm.append(redeemLabel,redeemConsent,redeem);
const decor=el('span',undefined,'jarvis-archive-box');decor.setAttribute('aria-hidden','true');preview.append(el('h3','Key preview'),summary,output,copy,el('p','Generation records an instruction. Only redemption executes it.'),el('h3','Redeem a key'),redeemForm,decor);layout.append(form,preview);main.append(layout);root.append(status,tabs,main,history);
const selected=()=>templates.find(t=>t.id===component.input.value)?.actions.find(a=>a.id===action.input.value);
function controls(){const a=selected();generate.disabled=busy||uncertain||issued||!a?.available||!confirmed.checked;redeem.disabled=busy||uncertain||!redeemCheck.checked||!codeInput.value.trim();action.input.disabled=busy||uncertain||issued;component.input.disabled=busy||uncertain||issued;confirmed.disabled=busy||uncertain||issued;for(const {input} of inputs.values())input.disabled=busy||uncertain||issued;fresh.hidden=!issued;fresh.disabled=busy||uncertain;}
function updateSummary(){const a=selected();summary.replaceChildren();for(const [k,v]of [['Template',component.input.selectedOptions[0]?.textContent||''],['Action',a?.label||'No registered action'],['Version',a?.version||'—'],['Usage','Once'],['Status',issuedCode?'Issued':'Not issued']])summary.append(el('dt',k),el('dd',String(v)));controls();}
function renderFields(){lookupGeneration++;lookupController?.abort();issued=false;const a=selected();inputs=new Map();fields.replaceChildren();targets.replaceChildren();confirmed.checked=false;issuedCode='';output.textContent='Not issued';copy.disabled=true;issueId=crypto.randomUUID();
for(const f of a?.fields||[]){const label=el('label',undefined,'codex-field'),input=el(f.type==='textarea'?'textarea':'input');if(input.tagName==='INPUT')input.type=f.type||'text';input.required=f.required===true;input.maxLength=f.maxLength||240;if(f.min!==undefined)input.min=f.min;input.setAttribute('aria-label',f.label);label.append(el('span',f.label),input);fields.append(label);inputs.set(f.name,{field:f,input});if(a.id==='accounts.test-minecraft-identity'&&f.name==='accountName'&&a.available){const list=el('datalist');list.id='jarvis-account-targets-'+crypto.randomUUID();input.setAttribute('list',list.id);input.autocomplete='off';const hint=el('small','Type at least two characters to find current eligible accounts. The target is verified again when the key is used.');label.append(list,hint);input.oninput=async()=>{const generation=++lookupGeneration;lookupController?.abort();list.replaceChildren();const q=input.value.trim();if(!/^[A-Za-z0-9_]{2,32}$/.test(q)||issued)return;lookupController=new AbortController();try{const response=await fetcher('/api/jarvis/generator/options?'+new URLSearchParams({actionId:a.id,q}),{credentials:'same-origin',cache:'no-store',signal:AbortSignal.any([controller.signal,lookupController.signal])}),data=await response.json();if(!alive||issued||generation!==lookupGeneration)return;if(!response.ok)throw Error(data.message||'Account suggestions are unavailable.');if(!Array.isArray(data.targets)||data.targets.length>25||data.targets.some(t=>!t||!/^[A-Za-z0-9_]{1,32}$/.test(t.value)||typeof t.label!=='string'||t.label.length>200))throw Error('Invalid account suggestions.');for(const target of data.targets){const option=el('option',target.label);option.value=target.value;list.append(option);}hint.textContent=data.targets.length+' eligible account matches. Generation and execution still recheck the current account.';}catch(error){if(alive&&generation===lookupGeneration&&error.name!=='AbortError')hint.textContent=error.message;}};}}
if(a?.fixedTargets){const table=el('table'),body=el('tbody');for(const name of a.fixedTargets){const row=el('tr');row.append(el('th',name),el('td','Current roster and owner · pinned on generation'));body.append(row);}table.append(body);targets.append(table);}
effect.textContent=a?.effect||(a?.recordOnly?'Sealed system record. It cannot be issued as a player reward.':'This action uses its existing domain service; standalone generator issuance is not connected yet.');updateSummary();}
function renderActions(){const t=templates.find(t=>t.id===component.input.value);action.input.replaceChildren();for(const a of t?.actions||[]){const o=el('option',a.label+(a.available?'':' · domain service'));o.value=a.id;action.input.append(o);}renderFields();}
function renderTemplates(){const before=component.input.value;component.input.replaceChildren();for(const t of templates){const o=el('option',t.label);o.value=t.id;component.input.append(o);}if(templates.some(t=>t.id===before))component.input.value=before;renderActions();}
async function request(path,options){const response=await fetcher(path,{credentials:'same-origin',cache:'no-store',signal:controller.signal,...options});const data=await response.json();if(!response.ok)throw Error(data.message||'J.A.R.V.I.S. could not confirm the request.');return data;}
async function write(path,body){busy=true;controls();try{const result=await request(path,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(body)});if(!alive)return null;return result;}catch(error){if(alive){uncertain=true;status.textContent=error.message+' Reload before another write; no automatic retry is sent.';}return null;}finally{busy=false;if(alive)controls();}}
form.onsubmit=async e=>{e.preventDefault();if(busy||uncertain||issued||!form.reportValidity()||!confirmed.checked)return;const a=selected();if(!a?.available)return;const values=Object.fromEntries([...inputs].map(([name,{field,input}])=>[name,field.type==='number'?Number(input.value):input.value]));const result=await write('/api/jarvis/generator',{actionId:a.id,templateVersion:a.version,values,requestId:issueId,confirmed:true});if(!result)return;issued=true;issuedCode=result.code||'';output.textContent=issuedCode||'This instruction is '+result.status+'.';codeInput.value=issuedCode;copy.disabled=!issuedCode;status.textContent=issuedCode?'Key generated. This instruction is locked. Choose New instruction to generate another.':'Existing instruction returned; no duplicate key was issued.';updateSummary();};
redeemForm.onsubmit=async e=>{e.preventDefault();if(busy||uncertain||!redeemCheck.checked||!redeemForm.reportValidity())return;const result=await write('/api/jarvis/generator/redeem',{code:codeInput.value.trim(),requestId:redeemId,confirmed:true});if(!result)return;status.textContent=result.replayed?'This instruction was already completed.':'Instruction completed. Result recorded in J.A.R.V.I.S. history.';redeemCheck.checked=false;codeInput.value='';redeemId=crypto.randomUUID();controls();};
copy.onclick=()=>navigator.clipboard.writeText(issuedCode).then(()=>{if(alive)status.textContent='Key copied.';}).catch(()=>{if(alive)status.textContent='Select the key text to copy it.';});
fresh.onclick=()=>{renderFields();status.textContent='New instruction started with a new request reference.';};
component.input.onchange=renderActions;action.input.onchange=renderFields;confirmed.onchange=controls;redeemCheck.onchange=controls;codeInput.oninput=controls;
generateTab.onclick=()=>{main.hidden=false;history.hidden=true;};historyTab.onclick=async()=>{main.hidden=true;history.hidden=false;history.replaceChildren(el('h3','Your generated instructions'));try{const data=await request('/api/jarvis/generator/history');if(!alive)return;for(const row of data.records){const p=el('p',row.action_id+' · v'+row.template_version+' · '+row.state+' · '+new Date(Number(row.created_at)).toLocaleString('en-GB'));history.append(p);}if(!data.records.length)history.append(el('p','No generated instructions.'));}catch(error){if(alive)history.append(el('p',error.message));}};
renderTemplates();void request('/api/jarvis/generator').then(data=>{if(!alive)return;templates=data.templates;recipient.textContent='Recipient: '+data.recipient;status.textContent='Choose a mastertemplate and action. Server authority checks apply on issue and use.';renderTemplates();}).catch(error=>{if(alive)status.textContent=error.message;});
root.dispose=()=>{alive=false;lookupController?.abort();controller.abort();root.remove();};return root;
}
import {MASTER_KEY_TEMPLATES} from '../jarvis-master-keys.mjs';
export const KEY_GENERATOR_COMPONENTS=MASTER_KEY_TEMPLATES.map(t=>[t.label,t.actions.map(a=>a.label),[]]);
const el=(tag,text,cls)=>{const n=document.createElement(tag);if(text!==undefined)n.textContent=text;if(cls)n.className=cls;return n;};
export function createKeyGeneratorDesign({fetcher=fetch}={}){
const controller=new AbortController();let lookupController=null,lookupGeneration=0;let alive=true,busy=false,uncertain=false,issued=false,templates=MASTER_KEY_TEMPLATES,inputs=new Map(),issuedCode='',issueId=crypto.randomUUID(),redeemId=crypto.randomUUID();
const root=el('section',undefined,'jarvis-generator'),status=el('p','Opening the masterkey register…','codex-preview-notice');status.setAttribute('role','status');
const tabs=el('nav',undefined,'jarvis-generator-tabs'),main=el('div'),history=el('section',undefined,'codex-management-box');history.hidden=true;
const generateTab=el('button','Generate key'),historyTab=el('button','History');for(const b of [generateTab,historyTab])b.type='button';tabs.append(generateTab,historyTab);
const layout=el('div',undefined,'codex-management-grid'),form=el('form',undefined,'codex-management-box'),preview=el('aside',undefined,'codex-management-box');
function selectField(label){const l=el('label',undefined,'codex-field'),i=el('select');i.setAttribute('aria-label',label);l.append(el('span',label),i);return {label:l,input:i};}
const component=selectField('Master template'),action=selectField('Action'),top=el('div',undefined,'jarvis-generator-fields');top.append(component.label,action.label);
const recipient=el('p'),fields=el('div'),effect=el('p',undefined,'codex-seal-note'),targets=el('div');
const consent=el('label',undefined,'jarvis-generator-consent'),confirmed=el('input');confirmed.type='checkbox';consent.append(confirmed,el('span','I reviewed the exact scope and effect.'));
const generate=el('button','Generate key');generate.type='submit';generate.disabled=true;
const fresh=el('button','New instruction');fresh.type='button';fresh.hidden=true;
form.append(el('h3','Template & action'),top,recipient,targets,fields,effect,consent,generate,fresh);
const summary=el('dl',undefined,'jarvis-generator-summary'),output=el('code','Not issued'),copy=el('button','Copy key'),redeemForm=el('form'),redeemLabel=el('label',undefined,'codex-field'),codeInput=el('input'),redeem=el('button','Redeem key'),redeemConsent=el('label',undefined,'jarvis-generator-consent'),redeemCheck=el('input');
codeInput.type='text';codeInput.autocomplete='off';codeInput.maxLength=128;codeInput.required=true;redeemLabel.append(el('span','Key to redeem'),codeInput);redeemCheck.type='checkbox';redeemConsent.append(redeemCheck,el('span','Execute the instruction stored in this key.'));redeem.type='submit';copy.type='button';copy.disabled=true;redeem.disabled=true;redeemForm.append(redeemLabel,redeemConsent,redeem);
const decor=el('span',undefined,'jarvis-archive-box');decor.setAttribute('aria-hidden','true');preview.append(el('h3','Key preview'),summary,output,copy,el('p','Generation records an instruction. Only redemption executes it.'),el('h3','Redeem a key'),redeemForm,decor);layout.append(form,preview);main.append(layout);root.append(status,tabs,main,history);
const selected=()=>templates.find(t=>t.id===component.input.value)?.actions.find(a=>a.id===action.input.value);
function controls(){const a=selected();generate.disabled=busy||uncertain||issued||!a?.available||!confirmed.checked;redeem.disabled=busy||uncertain||!redeemCheck.checked||!codeInput.value.trim();action.input.disabled=busy||uncertain||issued;component.input.disabled=busy||uncertain||issued;confirmed.disabled=busy||uncertain||issued;for(const {input} of inputs.values())input.disabled=busy||uncertain||issued;fresh.hidden=!issued;fresh.disabled=busy||uncertain;}
function updateSummary(){const a=selected();summary.replaceChildren();for(const [k,v]of [['Template',component.input.selectedOptions[0]?.textContent||''],['Action',a?.label||'No registered action'],['Version',a?.version||'—'],['Usage','Once'],['Status',issuedCode?'Issued':'Not issued']])summary.append(el('dt',k),el('dd',String(v)));controls();}
function renderFields(){lookupGeneration++;lookupController?.abort();issued=false;const a=selected();inputs=new Map();fields.replaceChildren();targets.replaceChildren();confirmed.checked=false;issuedCode='';output.textContent='Not issued';copy.disabled=true;issueId=crypto.randomUUID();
for(const f of a?.fields||[]){const label=el('label',undefined,'codex-field'),input=el(f.type==='textarea'?'textarea':'input');if(input.tagName==='INPUT')input.type=f.type||'text';input.required=f.required===true;input.maxLength=f.maxLength||240;if(f.min!==undefined)input.min=f.min;input.setAttribute('aria-label',f.label);label.append(el('span',f.label),input);fields.append(label);inputs.set(f.name,{field:f,input});if(a.id==='accounts.test-minecraft-identity'&&f.name==='accountName'&&a.available){const list=el('datalist');list.id='jarvis-account-targets-'+crypto.randomUUID();input.setAttribute('list',list.id);input.autocomplete='off';const hint=el('small','Type at least two characters to find current eligible accounts. The target is verified again when the key is used.');label.append(list,hint);input.oninput=async()=>{const generation=++lookupGeneration;lookupController?.abort();list.replaceChildren();const q=input.value.trim();if(!/^[A-Za-z0-9_]{2,32}$/.test(q)||issued)return;lookupController=new AbortController();try{const response=await fetcher('/api/jarvis/generator/options?'+new URLSearchParams({actionId:a.id,q}),{credentials:'same-origin',cache:'no-store',signal:AbortSignal.any([controller.signal,lookupController.signal])}),data=await response.json();if(!alive||issued||generation!==lookupGeneration)return;if(!response.ok)throw Error(data.message||'Account suggestions are unavailable.');if(!Array.isArray(data.targets)||data.targets.length>25||data.targets.some(t=>!t||!/^[A-Za-z0-9_]{1,32}$/.test(t.value)||typeof t.label!=='string'||t.label.length>200))throw Error('Invalid account suggestions.');for(const target of data.targets){const option=el('option',target.label);option.value=target.value;list.append(option);}hint.textContent=data.targets.length+' eligible account matches. Generation and execution still recheck the current account.';}catch(error){if(alive&&generation===lookupGeneration&&error.name!=='AbortError')hint.textContent=error.message;}};}}
if(a?.fixedTargets){const table=el('table'),body=el('tbody');for(const name of a.fixedTargets){const row=el('tr');row.append(el('th',name),el('td','Current roster and owner · pinned on generation'));body.append(row);}table.append(body);targets.append(table);}
effect.textContent=a?.effect||(a?.recordOnly?'Sealed system record. It cannot be issued as a player reward.':'This action uses its existing domain service; standalone generator issuance is not connected yet.');updateSummary();}
function renderActions(){const t=templates.find(t=>t.id===component.input.value);action.input.replaceChildren();for(const a of t?.actions||[]){const o=el('option',a.label+(a.available?'':' · domain service'));o.value=a.id;action.input.append(o);}renderFields();}
function renderTemplates(){const before=component.input.value;component.input.replaceChildren();for(const t of templates){const o=el('option',t.label);o.value=t.id;component.input.append(o);}const prior=templates.find(t=>t.id===before),preferred=prior?.actions.some(a=>a.available)?prior:templates.find(t=>t.actions.some(a=>a.available))||prior;if(preferred)component.input.value=preferred.id;renderActions();}
async function request(path,options){const response=await fetcher(path,{credentials:'same-origin',cache:'no-store',signal:controller.signal,...options});const data=await response.json();if(!response.ok)throw Error(data.message||'J.A.R.V.I.S. could not confirm the request.');return data;}
async function write(path,body){busy=true;controls();try{const result=await request(path,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(body)});if(!alive)return null;return result;}catch(error){if(alive){uncertain=true;status.textContent=error.message+' Reload before another write; no automatic retry is sent.';}return null;}finally{busy=false;if(alive)controls();}}
form.onsubmit=async e=>{e.preventDefault();if(busy||uncertain||issued||!form.reportValidity()||!confirmed.checked)return;const a=selected();if(!a?.available)return;const values=Object.fromEntries([...inputs].map(([name,{field,input}])=>[name,field.type==='number'?Number(input.value):input.value]));const result=await write('/api/jarvis/generator',{actionId:a.id,templateVersion:a.version,values,requestId:issueId,confirmed:true});if(!result)return;issued=true;issuedCode=result.code||'';output.textContent=issuedCode||'This instruction is '+result.status+'.';codeInput.value=issuedCode;copy.disabled=!issuedCode;status.textContent=issuedCode?'Key generated. This instruction is locked. Choose New instruction to generate another.':'Existing instruction returned; no duplicate key was issued.';updateSummary();};
redeemForm.onsubmit=async e=>{e.preventDefault();if(busy||uncertain||!redeemCheck.checked||!redeemForm.reportValidity())return;const result=await write('/api/jarvis/generator/redeem',{code:codeInput.value.trim(),requestId:redeemId,confirmed:true});if(!result)return;status.textContent=result.replayed?'This instruction was already completed.':'Instruction completed. Result recorded in J.A.R.V.I.S. history.';redeemCheck.checked=false;codeInput.value='';redeemId=crypto.randomUUID();controls();};
copy.onclick=()=>navigator.clipboard.writeText(issuedCode).then(()=>{if(alive)status.textContent='Key copied.';}).catch(()=>{if(alive)status.textContent='Select the key text to copy it.';});
fresh.onclick=()=>{renderFields();status.textContent='New instruction started with a new request reference.';};
component.input.onchange=renderActions;action.input.onchange=renderFields;confirmed.onchange=controls;redeemCheck.onchange=controls;codeInput.oninput=controls;
generateTab.onclick=()=>{main.hidden=false;history.hidden=true;};historyTab.onclick=async()=>{main.hidden=true;history.hidden=false;history.replaceChildren(el('h3','Your generated instructions'));try{const data=await request('/api/jarvis/generator/history');if(!alive)return;for(const row of data.records){const p=el('p',row.action_id+' · v'+row.template_version+' · '+row.state+' · '+new Date(Number(row.created_at)).toLocaleString('en-GB'));history.append(p);}if(!data.records.length)history.append(el('p','No generated instructions.'));}catch(error){if(alive)history.append(el('p',error.message));}};
renderTemplates();void request('/api/jarvis/generator').then(data=>{if(!alive)return;templates=data.templates;recipient.textContent='Recipient: '+data.recipient;status.textContent='Choose a mastertemplate and action. Server authority checks apply on issue and use.';renderTemplates();}).catch(error=>{if(alive)status.textContent=error.message;});
root.dispose=()=>{alive=false;lookupController?.abort();controller.abort();root.remove();};return root;
}

View file

@ -534,7 +534,7 @@ export function createPanel(db,settings={},dependencies={}){
try{const bytes=await readFile(new URL('./public/cp-v2/'+path.slice(path.lastIndexOf('/')+1),import.meta.url));return new Response(request.method==='HEAD'?null:bytes,{headers:{'Content-Type':path.endsWith('.css')?'text/css; charset=utf-8':'text/javascript; charset=utf-8','Cache-Control':'private, no-store','X-Content-Type-Options':'nosniff'}});}catch(error){if(error.code==='ENOENT')return new Response('Not found',{status:404});throw error;}
}
if(['/v2/faith-theme-loader.mjs','/v2/faith-theme.css','/v2/cp-v2-codex-management.mjs','/v2/cp-v2-codex-management.css','/v2/cp-v2-exchange-design.mjs','/v2/cp-v2-exchange-design.css'].includes(path))return new Response(request.method==='HEAD'?null:await readFile(new URL('./public/cp-v2/'+path.slice(4),import.meta.url)),{headers:{'Content-Type':path.endsWith('.css')?'text/css; charset=utf-8':'text/javascript; charset=utf-8','Cache-Control':'no-store','Access-Control-Allow-Origin':'*'}});
if(['/jarvis-master-keys.mjs','/jarvis-brand.mjs','/organisation-tabs.mjs','/organisation-tabs.css','/codex-code-format.mjs','/codex-dossier-format.mjs'].includes(path))return new Response(request.method==='HEAD'?null:await readFile(new URL('./public/'+path.slice(1),import.meta.url)),{headers:{'Content-Type':path.endsWith('.css')?'text/css; charset=utf-8':'text/javascript; charset=utf-8','Cache-Control':'no-store','Access-Control-Allow-Origin':'*'}});
if(['/war-exchange-policy.mjs','/jarvis-master-keys.mjs','/jarvis-brand.mjs','/organisation-tabs.mjs','/organisation-tabs.css','/codex-code-format.mjs','/codex-dossier-format.mjs'].includes(path))return new Response(request.method==='HEAD'?null:await readFile(new URL('./public/'+path.slice(1),import.meta.url)),{headers:{'Content-Type':path.endsWith('.css')?'text/css; charset=utf-8':'text/javascript; charset=utf-8','Cache-Control':'no-store','Access-Control-Allow-Origin':'*'}});
if(['/v2/citizen-directory.mjs','/v2/citizen-directory.css','/v2/organisation-permissions.mjs'].includes(path))return new Response(request.method==='HEAD'?null:await readFile(new URL('./public/cp-v2/'+path.slice('/v2/'.length),import.meta.url)),{headers:{'Content-Type':path.endsWith('.css')?'text/css; charset=utf-8':'text/javascript; charset=utf-8','Cache-Control':'private, no-store','X-Content-Type-Options':'nosniff'}});
if(['/','/index.html','/v2','/v2/','/v2/cp-v2-politics-pages.mjs','/v2/cp-v2-auth.mjs','/v2/cp-v2-access.mjs','/v2/citizens-registry.mjs','/v2/cp-v2-page-template.mjs','/v2/imperial-permissions.mjs','/v2/honours-seals.mjs','/v2/cp-v2-planned-pages.mjs','/v2/cp-v2-choam-pages.mjs','/v2/cp-v2-bureau-pages.mjs','/v2/cp-v2-service-pages.mjs','/v2/cp-v2-newsroom.mjs','/v2/cp-v2-moderation.mjs','/v2/cp-v2-native-services.mjs','/v2/cp-v2-exchange-authority.mjs','/v2/cp-v2-crysknife.mjs','/v2/cp-v2-post-menu.mjs','/v2/cp-v2-postbank-foundation.mjs','/v2/cp-v2-postbank-payments.mjs','/v2/cp-v2-postbank-admin.mjs','/v2/cp-v2-authorisations.mjs','/v2/cp-v2-tax-treasury.mjs','/v2/cp-v2-reserve-ledger.mjs','/v2/cp-v2-reserve-entry.mjs','/v2/cp-v2-postbank-credit.mjs','/v2/cp-v2-postbank-beneficiaries.mjs','/v2/cp-v2-postbank-statement-archive.mjs','/v2/cp-v2-bank-pages.mjs','/v2/cp-v2-post-pages.mjs','/v2/cp-v2-code-redemption.mjs','/v2/cp-v2-rewards.mjs','/v2/cp-v2-user-commerce.mjs','/v2/cp-v2-user-pages.mjs','/v2/cp-v2-user-api.mjs','/v2/cp-v2-security.mjs','/v2/cp-v2-passport.mjs','/v2/cp-v2-personal-records.mjs','/v2/cp-v2-design-pages.mjs','/v2/cp-v2-design-catalog.mjs','/v2/cp-v2-forge-pages.mjs','/v2/cp-v2-hosting.mjs','/v2/cp-v2-community-treasury.mjs','/v2/cp-v2-item-register.mjs','/v2/cp-v2-kit-directorate.mjs','/v2/cp-v2-campaigns.mjs','/v2/cp-v2-imperial-revenue.mjs','/v2/cp-v2-read-register.mjs','/v2/cp-v2-bureau-data.mjs','/v2/cp-v2-company-actions.mjs','/v2/v2.css','/v2/v2.js'].includes(path)){
const moduleFile=path.endsWith('.mjs')||path.endsWith('.js');

View file

@ -1,7 +1,56 @@
{
"schemaVersion": 1,
"sourceHash": "5fad98a571f599384c7d7c1f290fb807ca9e318f3521a72eb49cd318adc496dd",
"sourceHash": "7640b162917d2f778feb803af7b512bc51983512ed39a9ebd8a9a4290b4adb83",
"actions": [
{
"id": "war.calendar-agreement",
"label": "War Exchange · War proposal and calendar agreement",
"version": 1,
"keyType": "entity-state",
"fields": [
{
"name": "ticketId",
"label": "Ban / support ticket ID",
"type": "text",
"required": true,
"maxLength": 80
},
{
"name": "proposalId",
"label": "Proposal UUID",
"type": "text",
"required": true
},
{
"name": "party",
"label": "Current clan or political side",
"type": "text",
"required": true
},
{
"name": "mode",
"label": "War mode",
"type": "text",
"required": true
},
{
"name": "startsAt",
"label": "Shared calendar hour",
"type": "number",
"required": true
},
{
"name": "requestId",
"label": "Request UUID",
"type": "text",
"required": true
}
],
"effect": "Separate proposal register; reuse Exchange cards and existing EVT calendar records. Only current named clan/POL authorities may choose their own hour. Two or three matching blocks schedule once; partial or different selections never schedule. Withdrawal cancels the linked event before start. No personal ownership transfer, live combat, money movement or invented capture progress.",
"fixedTargets": [],
"webIssue": false,
"recordOnly": true
},
{
"id": "clan.clear-protected-rosters",
"label": "Clan · Clear protected clan rosters",