mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-08-15 15:10:32 +02:00
release: prepare v0.9.7
This commit is contained in:
@@ -0,0 +1,187 @@
|
||||
/**
|
||||
* AI Intel types — shared TypeScript interfaces for the AI Intel subsystem.
|
||||
*/
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Entity Attachment (pin tracks a moving object)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export interface EntityAttachment {
|
||||
entity_type: string; // "ship", "flight", "satellite", etc.
|
||||
entity_id: string;
|
||||
entity_label: string;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Pin Layers
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export interface AIIntelLayer {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
source: string; // "user" | "openclaw" | "system" | "external"
|
||||
visible: boolean;
|
||||
color: string;
|
||||
created_at: number;
|
||||
created_at_iso: string;
|
||||
feed_url: string;
|
||||
feed_interval: number;
|
||||
feed_last_fetched?: number;
|
||||
pin_count: number;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Pins
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export interface AIIntelPinComment {
|
||||
id: string;
|
||||
text: string;
|
||||
author: string; // "user" | "agent" | "openclaw"
|
||||
author_label: string;
|
||||
reply_to: string; // parent comment id, if any
|
||||
created_at: number;
|
||||
created_at_iso: string;
|
||||
}
|
||||
|
||||
export interface AIIntelPin {
|
||||
id: string;
|
||||
layer_id: string;
|
||||
lat: number;
|
||||
lng: number;
|
||||
label: string;
|
||||
category: PinCategory;
|
||||
color: string;
|
||||
description: string;
|
||||
source: string;
|
||||
source_url: string;
|
||||
confidence: number;
|
||||
created_at: string;
|
||||
expires_at?: number | null;
|
||||
metadata: Record<string, unknown>;
|
||||
entity_attachment?: EntityAttachment | null;
|
||||
comments?: AIIntelPinComment[];
|
||||
}
|
||||
|
||||
export type PinCategory =
|
||||
| 'threat'
|
||||
| 'news'
|
||||
| 'geolocation'
|
||||
| 'custom'
|
||||
| 'anomaly'
|
||||
| 'military'
|
||||
| 'maritime'
|
||||
| 'flight'
|
||||
| 'infrastructure'
|
||||
| 'weather'
|
||||
| 'sigint'
|
||||
| 'prediction'
|
||||
| 'research';
|
||||
|
||||
export const PIN_CATEGORY_COLORS: Record<PinCategory, string> = {
|
||||
threat: '#ef4444',
|
||||
news: '#f59e0b',
|
||||
geolocation: '#8b5cf6',
|
||||
custom: '#3b82f6',
|
||||
anomaly: '#f97316',
|
||||
military: '#dc2626',
|
||||
maritime: '#0ea5e9',
|
||||
flight: '#6366f1',
|
||||
infrastructure: '#64748b',
|
||||
weather: '#22d3ee',
|
||||
sigint: '#a855f7',
|
||||
prediction: '#eab308',
|
||||
research: '#10b981',
|
||||
};
|
||||
|
||||
export const PIN_CATEGORY_LABELS: Record<PinCategory, string> = {
|
||||
threat: 'Threat',
|
||||
news: 'News',
|
||||
geolocation: 'Geolocation',
|
||||
custom: 'Custom',
|
||||
anomaly: 'Anomaly',
|
||||
military: 'Military',
|
||||
maritime: 'Maritime',
|
||||
flight: 'Flight',
|
||||
infrastructure: 'Infrastructure',
|
||||
weather: 'Weather',
|
||||
sigint: 'SIGINT',
|
||||
prediction: 'Prediction',
|
||||
research: 'Research',
|
||||
};
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Status / GeoJSON / Other
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export interface AIIntelStatus {
|
||||
ok: boolean;
|
||||
service: string;
|
||||
version: string;
|
||||
pin_count: number;
|
||||
pin_categories: Record<string, number>;
|
||||
capabilities: string[];
|
||||
timestamp: number;
|
||||
}
|
||||
|
||||
export interface AIIntelGeoJSON {
|
||||
type: 'FeatureCollection';
|
||||
features: Array<{
|
||||
type: 'Feature';
|
||||
geometry: {
|
||||
type: 'Point';
|
||||
coordinates: [number, number];
|
||||
};
|
||||
properties: {
|
||||
id: string;
|
||||
layer_id: string;
|
||||
label: string;
|
||||
category: PinCategory;
|
||||
color: string;
|
||||
description: string;
|
||||
source: string;
|
||||
source_url: string;
|
||||
confidence: number;
|
||||
created_at: string;
|
||||
entity_attachment?: EntityAttachment;
|
||||
};
|
||||
}>;
|
||||
}
|
||||
|
||||
export interface SatelliteScene {
|
||||
scene_id: string;
|
||||
datetime: string;
|
||||
cloud_cover: number;
|
||||
platform: string;
|
||||
thumbnail_url: string;
|
||||
fullres_url: string;
|
||||
bbox: number[];
|
||||
}
|
||||
|
||||
export interface NewsNearResult {
|
||||
ok: boolean;
|
||||
center: { lat: number; lng: number };
|
||||
radius_miles: number;
|
||||
gdelt: Array<{
|
||||
name: string;
|
||||
count: number;
|
||||
urls: string[];
|
||||
headlines: string[];
|
||||
lat: number;
|
||||
lng: number;
|
||||
distance_miles: number;
|
||||
}>;
|
||||
gdelt_count: number;
|
||||
news: Array<{
|
||||
title: string;
|
||||
summary: string;
|
||||
source: string;
|
||||
link: string;
|
||||
risk_score: number;
|
||||
lat: number;
|
||||
lng: number;
|
||||
distance_miles: number;
|
||||
}>;
|
||||
news_count: number;
|
||||
}
|
||||
@@ -147,12 +147,15 @@ export type SatelliteMission =
|
||||
| 'military_recon'
|
||||
| 'military_sar'
|
||||
| 'military_ew'
|
||||
| 'military_comms'
|
||||
| 'sar'
|
||||
| 'commercial_imaging'
|
||||
| 'navigation'
|
||||
| 'early_warning'
|
||||
| 'space_station'
|
||||
| 'sigint'
|
||||
| 'starlink'
|
||||
| 'constellation'
|
||||
| 'general';
|
||||
|
||||
export interface Satellite {
|
||||
@@ -169,6 +172,41 @@ export interface Satellite {
|
||||
heading: number;
|
||||
}
|
||||
|
||||
export interface SatManeuverAlert {
|
||||
norad_id: number;
|
||||
name: string;
|
||||
type: 'maneuver';
|
||||
reasons: string[];
|
||||
epoch: string;
|
||||
delta_period_min: number;
|
||||
delta_inclination_deg: number;
|
||||
delta_eccentricity: number;
|
||||
}
|
||||
|
||||
export interface SatDecayAlert {
|
||||
norad_id: number;
|
||||
name: string;
|
||||
type: 'decay_anomaly';
|
||||
mm_rate: number;
|
||||
current_mm: number;
|
||||
approx_alt_km: number;
|
||||
epoch: string;
|
||||
dt_days: number;
|
||||
}
|
||||
|
||||
export interface StarlinkSummary {
|
||||
total: number;
|
||||
shells: Record<string, number>;
|
||||
}
|
||||
|
||||
export interface SatelliteAnalysis {
|
||||
maneuvers: SatManeuverAlert[];
|
||||
decay_anomalies: SatDecayAlert[];
|
||||
starlink: StarlinkSummary;
|
||||
catalog_size: number;
|
||||
classified_count: number;
|
||||
}
|
||||
|
||||
// ─── EARTHQUAKES ────────────────────────────────────────────────────────────
|
||||
|
||||
export interface Earthquake {
|
||||
@@ -458,6 +496,51 @@ export interface Volcano {
|
||||
lng: number;
|
||||
}
|
||||
|
||||
// ─── UAP SIGHTINGS ─────────────────────────────────────────────────────
|
||||
|
||||
export interface UAPSighting {
|
||||
id: string;
|
||||
date_time: string;
|
||||
city: string;
|
||||
state: string;
|
||||
country: string;
|
||||
shape: string;
|
||||
shape_raw: string;
|
||||
duration: string;
|
||||
summary: string;
|
||||
posted: string;
|
||||
lat: number;
|
||||
lng: number;
|
||||
source: string;
|
||||
}
|
||||
|
||||
// ─── WASTEWATER SCAN ────────────────────────────────��─────────────────
|
||||
|
||||
export interface WastewaterPathogen {
|
||||
name: string;
|
||||
target_key: string;
|
||||
concentration: number;
|
||||
normalized: number;
|
||||
activity: string;
|
||||
alert: boolean;
|
||||
}
|
||||
|
||||
export interface WastewaterPlant {
|
||||
id: string;
|
||||
name: string;
|
||||
site_name: string;
|
||||
city: string;
|
||||
state: string;
|
||||
country: string;
|
||||
population: number | null;
|
||||
lat: number;
|
||||
lng: number;
|
||||
pathogens: WastewaterPathogen[];
|
||||
alert_count: number;
|
||||
collection_date: string;
|
||||
source: string;
|
||||
}
|
||||
|
||||
export interface FishingEvent {
|
||||
id: string;
|
||||
type: string;
|
||||
@@ -465,21 +548,67 @@ export interface FishingEvent {
|
||||
lng: number;
|
||||
start: string;
|
||||
end: string;
|
||||
vessel_id?: string;
|
||||
vessel_ssvid?: string;
|
||||
vessel_name: string;
|
||||
vessel_flag: string;
|
||||
duration_hrs: number;
|
||||
event_count?: number;
|
||||
}
|
||||
|
||||
// ─── CORRELATION ALERTS ────────────────────────────────────────────────────
|
||||
|
||||
// ─── CROWDTHREAT ───────────────────────────────────────────────────────────
|
||||
|
||||
export interface CrowdThreatItem {
|
||||
id: number;
|
||||
title: string;
|
||||
summary?: string;
|
||||
lat: number;
|
||||
lng: number;
|
||||
address: string;
|
||||
city: string;
|
||||
country?: string;
|
||||
category: string;
|
||||
category_id: number;
|
||||
category_colour: string;
|
||||
subcategory: string;
|
||||
threat_type: string;
|
||||
icon_id: string;
|
||||
occurred: string;
|
||||
occurred_iso?: string;
|
||||
timeago: string;
|
||||
reported?: string;
|
||||
verification?: string;
|
||||
severity?: string;
|
||||
source_url?: string;
|
||||
media_urls?: string[];
|
||||
votes?: number;
|
||||
reporter?: string;
|
||||
source: string;
|
||||
}
|
||||
|
||||
export interface CorrelationAlert {
|
||||
lat: number;
|
||||
lng: number;
|
||||
type: 'rf_anomaly' | 'military_buildup' | 'infra_cascade';
|
||||
type: 'rf_anomaly' | 'military_buildup' | 'infra_cascade' | 'contradiction' | 'analysis_zone';
|
||||
severity: 'high' | 'medium' | 'low';
|
||||
score: number;
|
||||
drivers: string[];
|
||||
cell_size: number;
|
||||
// Contradiction-specific fields
|
||||
context?: 'STRONG' | 'MODERATE' | 'WEAK' | 'DETECTION_GAP';
|
||||
alternatives?: string[];
|
||||
location_name?: string;
|
||||
headlines?: string[];
|
||||
related_markets?: { title: string; probability: number }[];
|
||||
nearby_outages?: { region: string; severity: number; distance_km: number }[];
|
||||
// Analysis zone fields (OpenClaw-placed overlays)
|
||||
id?: string;
|
||||
title?: string;
|
||||
body?: string;
|
||||
category?: string;
|
||||
source?: string;
|
||||
}
|
||||
|
||||
// ─── NEWS / GLOBAL INCIDENTS ────────────────────────────────────────────────
|
||||
@@ -544,8 +673,20 @@ export interface GDELTIncident {
|
||||
properties: {
|
||||
name: string;
|
||||
count: number;
|
||||
event_date?: string;
|
||||
event_code?: string;
|
||||
quad_class?: number;
|
||||
goldstein?: number;
|
||||
num_mentions?: number;
|
||||
num_sources?: number;
|
||||
num_articles?: number;
|
||||
avg_tone?: number;
|
||||
actor1?: string;
|
||||
actor2?: string;
|
||||
actors?: string[];
|
||||
_urls_list: string[];
|
||||
_headlines_list: string[];
|
||||
_snippets_list?: string[];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -557,11 +698,13 @@ export interface LiveUAmapIncident {
|
||||
lng: number;
|
||||
title: string;
|
||||
description?: string;
|
||||
date: string;
|
||||
timestamp?: number;
|
||||
date?: string;
|
||||
timestamp?: number | string;
|
||||
link?: string;
|
||||
category?: string;
|
||||
region?: string;
|
||||
image?: string;
|
||||
source?: string;
|
||||
}
|
||||
|
||||
// ─── STOCKS & COMMODITIES ───────────────────────────────────────────────────
|
||||
@@ -702,6 +845,7 @@ export interface DashboardData {
|
||||
liveuamap?: LiveUAmapIncident[];
|
||||
gps_jamming?: GPSJammingZone[];
|
||||
satellites?: Satellite[];
|
||||
satellite_analysis?: SatelliteAnalysis;
|
||||
sigint?: SigintSignal[];
|
||||
trains?: Train[];
|
||||
|
||||
@@ -755,8 +899,80 @@ export interface DashboardData {
|
||||
// Cross-layer correlations
|
||||
correlations?: CorrelationAlert[];
|
||||
|
||||
// UAP sightings
|
||||
uap_sightings?: UAPSighting[];
|
||||
|
||||
// WastewaterSCAN pathogen surveillance
|
||||
wastewater?: WastewaterPlant[];
|
||||
|
||||
// CrowdThreat — crowdsourced threat intelligence
|
||||
crowdthreat?: CrowdThreatItem[];
|
||||
|
||||
// FIMI disinformation
|
||||
fimi?: FimiData;
|
||||
|
||||
// SAR (Synthetic Aperture Radar) layer
|
||||
sar_scenes?: SarScene[];
|
||||
sar_anomalies?: SarAnomaly[];
|
||||
sar_aoi_coverage?: SarAoiCoverage[];
|
||||
sar_aois?: SarAoi[];
|
||||
}
|
||||
|
||||
// ─── SAR ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
export interface SarScene {
|
||||
scene_id: string;
|
||||
platform: string;
|
||||
mode: string;
|
||||
level: string;
|
||||
time: string;
|
||||
aoi_id: string;
|
||||
relative_orbit: number;
|
||||
flight_direction: string;
|
||||
bbox: number[];
|
||||
download_url: string;
|
||||
provider: string;
|
||||
raw_provider_id?: string;
|
||||
}
|
||||
|
||||
export interface SarAnomaly {
|
||||
anomaly_id: string;
|
||||
kind: string;
|
||||
lat: number;
|
||||
lon: number;
|
||||
magnitude: number;
|
||||
magnitude_unit: string;
|
||||
confidence: number;
|
||||
first_seen: number;
|
||||
last_seen: number;
|
||||
aoi_id: string;
|
||||
scene_count: number;
|
||||
solver: string;
|
||||
source_constellation: string;
|
||||
provenance_url: string;
|
||||
category: string;
|
||||
title: string;
|
||||
summary: string;
|
||||
evidence_hash?: string;
|
||||
extras?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface SarAoi {
|
||||
id: string;
|
||||
name: string;
|
||||
description?: string;
|
||||
center: [number, number]; // [lat, lon]
|
||||
radius_km: number;
|
||||
polygon?: number[][] | null;
|
||||
category: string;
|
||||
}
|
||||
|
||||
export interface SarAoiCoverage {
|
||||
aoi_id: string;
|
||||
scene_count?: number;
|
||||
last_pass?: string;
|
||||
next_pass?: string;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
// ─── COMPONENT PROPS ────────────────────────────────────────────────────────
|
||||
@@ -803,6 +1019,12 @@ export interface ActiveLayers {
|
||||
shodan_overlay: boolean;
|
||||
viirs_nightlights: boolean;
|
||||
correlations: boolean;
|
||||
contradictions: boolean;
|
||||
uap_sightings: boolean;
|
||||
wastewater: boolean;
|
||||
ai_intel: boolean;
|
||||
crowdthreat: boolean;
|
||||
sar: boolean;
|
||||
}
|
||||
|
||||
export interface SelectedEntity {
|
||||
@@ -861,4 +1083,10 @@ export interface MaplibreViewerProps {
|
||||
setTrackedScanner?: (scanner: Scanner | null) => void;
|
||||
shodanResults?: import('@/types/shodan').ShodanSearchMatch[];
|
||||
shodanStyle?: import('@/types/shodan').ShodanStyleConfig;
|
||||
pinPlacementMode?: boolean;
|
||||
onPinPlaced?: () => void;
|
||||
sarAoiDropMode?: boolean;
|
||||
onSarAoiDropped?: (coords: { lat: number; lng: number }) => void;
|
||||
/** Incremented when the AOI list is modified — triggers immediate re-fetch. */
|
||||
sarAoiListVersion?: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user