Skip to content

Cases & intel ​

A case is the container of an investigation. Everything the tools learn about it is filed as intel. The ops map, the alert stream, the dossier timeline and the link graph are all views of that one stream.

Cases ​

Field Meaning
Title Up to 96 characters
Status open, cold or closed. The console shows the status next to the title
Threat level 0 to 5, shown as a badge on the Ops tab
Lead The identifier of the lead investigator. The creator becomes the lead member
Members Players on the case, each with a case role: investigator, lead or judge
Subjects The people the case is about, see below

The console's case list on the left shows the cases the player is a member of. Staff see every case. Everything a tool does is scoped to one case: a player needs the role for the action and membership of that case (Installation → Roles). The exception is a judge deciding a warrant.

Opening, closing and sharing cases has no console control yet

The server side is there: the method cases.create opens a case for an investigator or lead (the creator becomes the lead), and the actions case.member and case.close exist for leads. But the console window has no button for any of them yet, and exports.np_surveillance has no export for them. Until the console gets those controls, a case has to be opened by calling cases.create through np_surveillance's own RPC channel. Everything after that (subjects, intel, devices, taps, warrants) works from the console as described on the following pages.

Every state change of a case, its members, subjects, warrants, devices and taps is written to the audit log (np_surveillance_audit). With np_admin it also goes to np_admin's audit log under the category surveillance, and the warrants module writes Discord lines when np_discord runs (Warrants).

Subjects ​

A subject is a person a case follows.

Field Meaning
Reference A character id (np_character) or the framework identifier, so the profile can be filled from the siblings
Name Up to 96 characters
Tier Watchlist tier 0 to 9 (Config.Dossier.maxTier)
Aliases Up to 12 names of up to 48 characters

A subject can be on several cases. Tag one from the Dossier tab (Dossiers) or from a script with tagSubject; the np_spy-pigeon mark does the latter.

Intel ​

One entry is one observation. Every tool files the same shape:

Field Meaning
caseId The case. Required
subjectId The subject it concerns, when known
kind What it is, a string of up to 24 characters (kinds)
source { type, id }: where it came from. Types in use are agent, device, line, camera, bird, bank, system, and the name of any registered source
payload A table, specific to the kind. At most Config.Intel.maxPayloadBytes (16 KB) encoded
coords A world position, optional
target The phone number, plate or subject reference a warrant must cover. Defaults to the source id or payload.number / payload.plate
severity 0 to 5, default 1. Drives the alert stream
warrantId A warrant that explicitly covers the entry. Otherwise the warrants module decides
admissible Set by np_surveillance: true when a warrant covers it, or when warrants are off

When an entry is added, np_surveillance validates it, runs the beforeIntel veto hook, applies the intelSeverity hook, decides admissibility, stores it, tells every onIntel subscriber and fires the np_surveillance:server:intel event. If the severity is at or above Config.Intel.alertSeverity (default 3) it also raises an alert (Ops console). It returns the new id, or nil and a code (unknown_case, invalid_params, forbidden from a veto hook, …).

Kinds ​

A kind is only a string, so any resource may file its own. The console labels the ones in Config.Intel.kinds.

Kind Filed by Meaning
note Dossier, Lines A typed case note or a live note while listening to a tap
sighting Devices, np_spy-pigeon An agent's own observation (binoculars), a marked person or a read plate
location Any resource A position fix. Read by the replay and the known locations; no module of np_surveillance files it itself
document np_spy-pigeon A photo with its position
ping Devices A GPS tracker position
call, sms Lines Metadata of a tapped call; a mirrored SMS with its keyword hits
bank Any resource A bank movement (payload.amount, a counterparty). The dossier draws it as a money link in the graph. No module of np_surveillance files these itself
link Dossier, Lines A drawn relationship between two subjects; a scanned number linked to a subject
alert Ops A trigger rule that flagged another entry
device Devices A device was planted or changed state (the USB implant is recorded this way)
bug, print Devices A room-bug or laser pickup; a fingerprint identification
geofence Ops A subject or device entered or left a geofence
audio np_spy-pigeon Voices heard by a bird's directional microphone
cctv_event np_cctv A notable camera event, or shared footage

Admissibility ​

With Config.Warrants.required off (the default) every entry is admissible and the warrants module is not needed. With it on, an entry is admissible only when an approved warrant covers its kind and target at that moment; otherwise it is stored and marked not admissible. Nothing is thrown away: the console shows it with a red flag and the link graph can leave it out (Config.Dossier.graph.admissibleOnly). See Warrants for which warrant covers which kind.

Sources ​

A source is a producer of intel that is not a person at a keyboard: a camera network, a bird, a dashboard. Register it once at start and again whenever np_surveillance restarts (it forgets sources on a restart):

lua
exports.np_surveillance:registerSource('np_cctv', { label = 'CCTV', icon = 'video', layer = 'cameras' })

pingSource(name, id, coords, data) reports a live point for a source. On its own it only announces the point (an internal event; nothing is stored). Add data.caseId and the ping is also filed as an intel entry (kind data.kind, or ping) on that case, and from there it shows up on the case's map as a trail, in the replay and in the timeline. np_cctv and np_spy-pigeon are built on sources. Field devices are registered the same way with registerDeviceType.

Where it lives ​

All data is in MySQL through oxmysql, in tables prefixed np_surveillance_: cases, case_members, subjects, case_subjects, intel, devices, warrants, audit, plus meta and timers. The schema is created and migrated on every start; sql/install.sql is the same SQL for installing by hand. Timestamps are unix seconds.