Skip to content

elite-dangerous-event-types

Audience: Agent

Purpose

Shared TypeScript types, type unions, and type guards for Elite Dangerous journal JSON lines (EliteEvent, EventType, …), Status.json (Status, isStatus), sidecar snapshots (Cargo.json, Market.json, … — see edosEnvelope.ts), and the desktop BridgeEnvelope (EdosFileEventEnvelope, isEdosFileEventEnvelope, constants EDOS_FILE_EVENT_MESSAGE / TAURI_EDOS_FILE_EVENT_CHANNEL). Published as @howfe/elite-dangerous-event-types.

Tech stack

  • TypeScript only (index.ts at package root).
  • package.json points main to index.ts — consumers resolve via their bundler/tooling.
  • Workspace package.json version (verify after pull): 1.1.0@howfe/inter-frame-messenger declares peer >=1.1.0 and dev ^1.1.0 (inter-frame-messenger/package.json).

Integration points

  • @howfe/inter-frame-messenger — imports journal/status guards plus isEdosFileEventEnvelope / EdosFileEventEnvelope for edos-file-event.
  • Quasar apps — import types and guards from map logic, composables, and components.
  • elite-dangerous-local-journal-readersrc/edosBridge.ts re-exports envelope types/helpers from this package.

Sidecar snapshots + EDOS envelope

  • Wire: Rust BridgeEnvelope on Tauri edos:file:event; IFM outer channel edos-file-event (see IPC.md).
  • Rust sourceType: serde string per variant (camelCase), e.g. journal, fCMaterials, navRoute, status — mirrored by EdosBridgeSourceKind.
  • Guards: isCargoSnapshotBlob, isMarketSnapshotBlob, … are intentionally tolerant (Frontier/schema drift); pair with sourceType + sourceFile from the envelope when asserting provenance.

Fixtures

Example envelope: elite-dangerous-event-types/fixtures/sidecars/sample-envelope.json (minimal structural sample).

For full real-world journal lines and sidecar blobs (variants, drift, rare events), the workspace may include journalFilesSamples/ at the repo root — workspace-local, not published on the docs site, and often missing in partial clones. If hosted types and this capsule are not enough, ask the operator for relevant samples; see AGENTS.md.

Extension points

  • Add or adjust event variants in index.ts when Frontier adds journal events or fields you need.
  • Keep guards (is*) in sync with structural assumptions; apps rely on them for safe narrowing.
  • Publishing: follow repository URL in package.json (GitLab); version bumps affect downstream semver ranges.

Pitfalls / checks

  • Large single file — search by symbol name; consider splitting only if the repo maintainers agree (out of scope for this doc).
  • Breaking changes ripple to inter-frame-messenger and both UIs — coordinate release order.