{"_id":"@airtrafficcontrol/types","name":"@airtrafficcontrol/types","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@airtrafficcontrol/types","version":"0.0.1","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"tsc --build"},"_id":"@airtrafficcontrol/types@0.0.1","description":"Pure TypeScript type definitions for the ATC domain model. No runtime logic, no external dependencies. This package is the single source of truth for every enum, interface, type alias, and const that other ATC packages import.","_integrity":"sha512-YCzQsKzyfblXdSwnyCH/4LCA+PEBTPB+bc0APb4m+7JbHhpeBCuIAxlK+/FudTqEENBBar9gcnYFMI7MW7BhGg==","_resolved":"/private/var/folders/n5/tzqmrds50218kyrpz8166v3w0000gn/T/f8810a249f1c438aca66fe7cf04a4da5/airtrafficcontrol-types-0.0.1.tgz","_from":"file:airtrafficcontrol-types-0.0.1.tgz","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-YCzQsKzyfblXdSwnyCH/4LCA+PEBTPB+bc0APb4m+7JbHhpeBCuIAxlK+/FudTqEENBBar9gcnYFMI7MW7BhGg==","shasum":"f2a1501bbcf619e37273d01f9caada5a6475a041","tarball":"https://registry.npmjs.org/@airtrafficcontrol/types/-/types-0.0.1.tgz","fileCount":67,"unpackedSize":98018,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA54o7QokOui/AusWdftW4X3fVmMSkP2/qRD+1Eo14FQAiEA26uNulcFuVUqZ4vjuLslfAdTd8DYgz5aBJOLnCn99Oc="}]},"_npmUser":{"name":"mfoulks200","email":"mfoulks1@gmail.com"},"directories":{},"maintainers":[{"name":"mfoulks200","email":"mfoulks1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/types_0.0.1_1776908425437_0.026577658653786473"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-23T01:40:25.341Z","0.0.1":"2026-04-23T01:40:25.556Z","modified":"2026-04-23T01:40:25.783Z"},"maintainers":[{"name":"mfoulks200","email":"mfoulks1@gmail.com"}],"description":"Pure TypeScript type definitions for the ATC domain model. No runtime logic, no external dependencies. This package is the single source of truth for every enum, interface, type alias, and const that other ATC packages import.","readme":"# @airtrafficcontrol/types\n\nPure TypeScript type definitions for the ATC domain model. No runtime logic, no external dependencies. This package is the single source of truth for every enum, interface, type alias, and const that other ATC packages import.\n\n## Installation\n\n```bash\npnpm add @airtrafficcontrol/types\n```\n\nThis is an internal workspace package (`workspace:*`).\n\n## API Reference\n\n### Enums\n\n#### `CraftStatus`\n\nAll possible lifecycle states for a craft. See `RULE-LIFE-1` through `RULE-LIFE-8`.\n\n| Value | Description |\n|---|---|\n| `Taxiing` | Craft initialized — branch created, pilots assigned, cargo and flight plan defined |\n| `InFlight` | Pilots actively implementing, navigating vectors in order |\n| `LandingChecklist` | All vectors passed; pilot runs validation checks |\n| `GoAround` | Landing checklist failed; pilot addresses failures before re-attempt |\n| `ClearedToLand` | Checklist passed, tower granted clearance; craft is in merge queue |\n| `Landed` | Branch merged into main (terminal state) |\n| `Emergency` | Pilot declared an emergency after repeated failures |\n| `ReturnToOrigin` | Craft sent back to design stage for re-evaluation (terminal state) |\n\n#### `SeatType`\n\nSeat types available on a craft. See `RULE-SEAT-1` through `RULE-SEAT-4`.\n\n| Value | Description |\n|---|---|\n| `Captain` | Pilot-in-command. Exactly one per craft |\n| `FirstOfficer` | Certified assistant pilot. Zero or more per craft |\n| `Jumpseat` | Observer/advisor. No code modification rights |\n\n#### `ControlMode`\n\nControl modes governing concurrent code modification. See `RULE-CTRL-1` through `RULE-CTRL-7`.\n\n| Value | Description |\n|---|---|\n| `Exclusive` | A single pilot holds the controls |\n| `Shared` | Two or more pilots hold controls with non-overlapping areas |\n\n#### `VectorStatus`\n\nStatus of a vector in a craft's flight plan. See `RULE-VEC-1` through `RULE-VEC-5`.\n\n| Value | Description |\n|---|---|\n| `Pending` | Vector has not been attempted yet |\n| `Passed` | Vector's acceptance criteria have been met |\n| `Failed` | Vector's acceptance criteria could not be met |\n\n#### `BlackBoxEntryType`\n\nTypes of black box log entries. See `RULE-BBOX-1` through `RULE-BBOX-4`.\n\n| Value | Description |\n|---|---|\n| `Decision` | An implementation decision (algorithm, library, approach choice) |\n| `VectorPassed` | A vector's acceptance criteria were met |\n| `GoAround` | The landing checklist failed and a go-around was initiated |\n| `Conflict` | A disagreement between pilots, and how it was resolved |\n| `Observation` | Any other noteworthy event, risk, or context |\n| `EmergencyDeclaration` | The captain has declared an emergency |\n\n### Interfaces\n\n#### `Craft`\n\nThe fundamental unit of work in ATC. See `RULE-CRAFT-1` through `RULE-CRAFT-5`.\n\n| Property | Type | Description |\n|---|---|---|\n| `callsign` | `string` | Unique, immutable identifier |\n| `branch` | `string` | Associated git branch (1:1) |\n| `cargo` | `string` | Description of the change and its scope |\n| `category` | `string` | Determines pilot eligibility |\n| `captain` | `Pilot` | Pilot-in-command |\n| `firstOfficers` | `readonly Pilot[]` | Certified assistant pilots |\n| `jumpseaters` | `readonly Pilot[]` | Observer/advisor pilots |\n| `flightPlan` | `FlightPlan` | Ordered milestones |\n| `blackBox` | `readonly BlackBoxEntry[]` | Append-only event log |\n| `controls` | `ControlState` | Current control state |\n| `status` | `CraftStatus` | Current lifecycle phase |\n\n#### `Pilot`\n\nAn autonomous agent that can be assigned to a craft. See `RULE-PILOT-1`, `RULE-PILOT-2`.\n\n| Property | Type | Description |\n|---|---|---|\n| `identifier` | `string` | Unique identifier for the pilot agent |\n| `certifications` | `readonly string[]` | Craft categories this pilot is certified to fly |\n\n#### `Vector`\n\nA milestone in a craft's flight plan. See `RULE-VEC-1` through `RULE-VEC-5`.\n\n| Property | Type | Description |\n|---|---|---|\n| `name` | `string` | Short, descriptive identifier |\n| `acceptanceCriteria` | `string` | Specific, verifiable conditions that must be met |\n| `status` | `VectorStatus` | Current status of this vector |\n\n#### `VectorReport`\n\nA report filed when a craft passes through a vector. See `RULE-VRPT-1` through `RULE-VRPT-4`.\n\n| Property | Type | Description |\n|---|---|---|\n| `craftCallsign` | `string` | The craft that passed the vector |\n| `vectorName` | `string` | The vector that was passed |\n| `acceptanceEvidence` | `string` | Proof that acceptance criteria were met |\n| `timestamp` | `Date` | When the vector was passed |\n\n#### `BlackBoxEntry`\n\nA single entry in a craft's black box log. See `RULE-BBOX-1` through `RULE-BBOX-4`.\n\n| Property | Type | Description |\n|---|---|---|\n| `timestamp` | `Date` | When the entry was recorded |\n| `author` | `string` | Identifier of the pilot who recorded the entry |\n| `type` | `BlackBoxEntryType` | The kind of event |\n| `content` | `string` | Description of the decision, event, or observation |\n\n#### `SeatAssignment`\n\nA pilot's assignment to a specific craft.\n\n| Property | Type | Description |\n|---|---|---|\n| `pilot` | `Pilot` | The assigned pilot |\n| `seat` | `SeatType` | The seat occupied on this craft |\n\n#### `ControlState`\n\nThe current state of a craft's controls. See `RULE-CTRL-1` through `RULE-CTRL-7`.\n\n| Property | Type | Description |\n|---|---|---|\n| `mode` | `ControlMode` | Current control mode |\n| `holder` | `string?` | In Exclusive mode: the single pilot holding controls |\n| `sharedAreas` | `readonly SharedControlArea[]?` | In Shared mode: the non-overlapping areas |\n\n#### `SharedControlArea`\n\nDescribes a shared control area assignment.\n\n| Property | Type | Description |\n|---|---|---|\n| `pilotIdentifier` | `string` | The pilot holding this area |\n| `area` | `string` | Description of the area of responsibility |\n\n### Type Aliases\n\n| Type | Definition | Description |\n|---|---|---|\n| `FlightPlan` | `readonly Vector[]` | Ordered sequence of vectors assigned to a craft |\n| `CraftTransition` | interface | A valid state transition (from, to, trigger, preconditions) |\n| `PilotAction` | string union | Actions a pilot can perform (`modifyCode`, `holdControls`, `writeBlackBox`, `fileVectorReport`, `declareEmergency`, `requestLandingClearance`) |\n| `SeatPermissions` | `Readonly<Record<PilotAction, boolean>>` | Permission flags for a given seat type |\n\n### Runtime Constants\n\n#### `TRANSITIONS`\n\nAll valid state transitions in the craft lifecycle (`readonly CraftTransition[]`). Any transition not listed is illegal. See `RULE-LIFE-2`.\n\nContains 9 transitions covering the full lifecycle: Taxiing -> InFlight -> LandingChecklist -> ClearedToLand -> Landed, with GoAround and Emergency branches.\n\n#### `TERMINAL_STATES`\n\n`ReadonlySet<CraftStatus>` containing `Landed` and `ReturnToOrigin`. No transitions out are permitted. See `RULE-LIFE-8`.\n\n#### `PERMISSIONS`\n\n`Readonly<Record<SeatType, SeatPermissions>>` mapping each seat type to its allowed actions. See `RULE-SEAT-1` through `RULE-SEAT-4`.\n\n| Action | Captain | First Officer | Jumpseat |\n|---|---|---|---|\n| `modifyCode` | yes | yes | no |\n| `holdControls` | yes | yes | no |\n| `writeBlackBox` | yes | yes | yes |\n| `fileVectorReport` | yes | yes | no |\n| `declareEmergency` | yes | no | no |\n| `requestLandingClearance` | yes | yes | no |\n\n## Usage\n\n```typescript\nimport {\n  CraftStatus,\n  SeatType,\n  ControlMode,\n  VectorStatus,\n  BlackBoxEntryType,\n  TRANSITIONS,\n  TERMINAL_STATES,\n  PERMISSIONS,\n} from \"@airtrafficcontrol/types\";\n\nimport type {\n  Craft,\n  Pilot,\n  Vector,\n  FlightPlan,\n  BlackBoxEntry,\n  VectorReport,\n  ControlState,\n  SeatAssignment,\n  SharedControlArea,\n  CraftTransition,\n  PilotAction,\n  SeatPermissions,\n} from \"@airtrafficcontrol/types\";\n```\n\n## Source Files\n\n| File | Contents |\n|---|---|\n| `src/enums.ts` | All 5 enums |\n| `src/entities.ts` | All entity interfaces |\n| `src/lifecycle.ts` | `CraftTransition`, `TRANSITIONS`, `TERMINAL_STATES` |\n| `src/permissions.ts` | `PilotAction`, `SeatPermissions`, `PERMISSIONS` |\n\n## Related Packages\n\n- [`@airtrafficcontrol/core`](../core/) — Runtime implementation consuming these types\n- [`@airtrafficcontrol/errors`](../errors/) — Error classes for rule violations\n- [`@airtrafficcontrol/validation`](../validation/) — Validation functions using these types\n","readmeFilename":"README.md","_rev":"1-b4ee31383430549b2ef206671bd715f2"}