Files
Shadowbroker/frontend/src/lib/meshTerminalPolicy.ts
T
anoracleofra-code 668ce16dc7 v0.9.6: InfoNet hashchain, Wormhole gate encryption, mesh reputation, 16 community contributors
Gate messages now propagate via the Infonet hashchain as encrypted blobs — every node syncs them
through normal chain sync while only Gate members with MLS keys can decrypt. Added mesh reputation
system, peer push workers, voluntary Wormhole opt-in for node participation, fork recovery,
killwormhole scripts, obfuscated terminology, and hardened the self-updater to protect encryption
keys and chain state during updates.

New features: Shodan search, train tracking, Sentinel Hub imagery, 8 new intelligence layers,
CCTV expansion to 11,000+ cameras across 6 countries, Mesh Terminal CLI, prediction markets,
desktop-shell scaffold, and comprehensive mesh test suite (215 frontend + backend tests passing).

Community contributors: @wa1id, @AlborzNazari, @adust09, @Xpirix, @imqdcr, @csysp, @suranyami,
@chr0n1x, @johan-martensson, @singularfailure, @smithbh, @OrfeoTerkuci, @deuza, @tm-const,
@Elhard1, @ttulttul
2026-03-26 05:58:04 -06:00

59 lines
1.6 KiB
TypeScript

export type MeshTerminalSecurityState = {
wormholeRequired: boolean;
wormholeReady: boolean;
anonymousMode: boolean;
anonymousModeReady: boolean;
};
export function getMeshTerminalWriteLockReason(state: MeshTerminalSecurityState): string {
if (state.anonymousMode) {
if (!state.anonymousModeReady) {
return 'Mesh Terminal write commands are disabled until Wormhole hidden transport is ready for Anonymous Infonet mode.';
}
return 'Mesh Terminal write commands are disabled while Anonymous Infonet mode is active. Use MeshChat for hardened public and private actions.';
}
if (state.wormholeRequired) {
if (!state.wormholeReady) {
return 'Mesh Terminal write commands are disabled until Wormhole secure mode is ready.';
}
return 'Mesh Terminal write commands are disabled while Wormhole secure mode is active. Use MeshChat for hardened private actions.';
}
return '';
}
export function isMeshTerminalWriteCommand(cmd: string, args: string[]): boolean {
const command = String(cmd || '').trim().toLowerCase();
const sub = String(args[0] || '').trim().toLowerCase();
if (
[
'connect',
'sovereignty',
'sovereign',
'activate',
'join',
'send',
'vote',
'say',
'predict',
'stake',
'rotate',
'revoke',
'dm',
'inbox',
].includes(command)
) {
return true;
}
if (command === 'mesh' || command === 'radio') {
return sub === 'send' || sub === 's';
}
if (command === 'gate') {
return sub === 'create';
}
return false;
}