{"_id":"@airtrafficcontrol/checklist","name":"@airtrafficcontrol/checklist","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@airtrafficcontrol/checklist","version":"0.0.1","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","dependencies":{"@airtrafficcontrol/types":"0.0.1","@airtrafficcontrol/errors":"0.0.1"},"scripts":{"build":"tsc --build"},"_id":"@airtrafficcontrol/checklist@0.0.1","description":"Landing checklist runner for the ATC system. Defines checklist items as named async validation steps, executes them sequentially, and aggregates pass/fail results. When any item fails, the craft must perform a go-around.","_integrity":"sha512-puwjtPmtdBkRyhY/m7CAQhZjteBT4fnsjuSUhrp8u3yFDcygBJxZBMe6ATIbbjDlWgYLt3/DrDhXan/I6TObMA==","_resolved":"/private/var/folders/n5/tzqmrds50218kyrpz8166v3w0000gn/T/e1877f8a15641e5e791ff1a316441d8e/airtrafficcontrol-checklist-0.0.1.tgz","_from":"file:airtrafficcontrol-checklist-0.0.1.tgz","_nodeVersion":"24.11.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-puwjtPmtdBkRyhY/m7CAQhZjteBT4fnsjuSUhrp8u3yFDcygBJxZBMe6ATIbbjDlWgYLt3/DrDhXan/I6TObMA==","shasum":"d4ee561209aba1495fec14721bb15077763d5851","tarball":"https://registry.npmjs.org/@airtrafficcontrol/checklist/-/checklist-0.0.1.tgz","fileCount":74,"unpackedSize":93460,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDIwMbknNktDVxrPKRq600awMuB6oPEoH2O0mjZjfLxNQIhAMJldf8lbzE3IcsKKSH19GWrzjOMah+gZf3n9Y2Hsvyb"}]},"_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/checklist_0.0.1_1776908434256_0.6960255766494401"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-23T01:40:34.142Z","0.0.1":"2026-04-23T01:40:34.390Z","modified":"2026-04-23T01:40:34.616Z"},"maintainers":[{"name":"mfoulks200","email":"mfoulks1@gmail.com"}],"description":"Landing checklist runner for the ATC system. Defines checklist items as named async validation steps, executes them sequentially, and aggregates pass/fail results. When any item fails, the craft must perform a go-around.","readme":"# @airtrafficcontrol/checklist\n\nLanding checklist runner for the ATC system. Defines checklist items as named async validation steps, executes them sequentially, and aggregates pass/fail results. When any item fails, the craft must perform a go-around.\n\n## Installation\n\n```bash\npnpm add @airtrafficcontrol/checklist\n```\n\nThis is an internal workspace package (`workspace:*`).\n\n## API Reference\n\n### Types\n\n#### `ChecklistItem`\n\nA named async validation step. See `RULE-LCHK-4`.\n\n| Property | Type | Description |\n|---|---|---|\n| `name` | `string` | Display name (e.g., \"Tests\", \"Lint\") |\n| `validate` | `() => Promise<ChecklistItemResult>` | Async function that runs the validation |\n\n#### `ChecklistItemResult`\n\nResult of a single checklist item. See `RULE-LCHK-2`.\n\n| Property | Type | Description |\n|---|---|---|\n| `name` | `string` | Name of the checklist item |\n| `passed` | `boolean` | Whether the validation passed |\n| `message` | `string?` | Optional human-readable message |\n\n#### `ChecklistResult`\n\nAggregate result of the full checklist run. See `RULE-LCHK-2`, `RULE-LCHK-3`.\n\n| Property | Type | Description |\n|---|---|---|\n| `passed` | `boolean` | True only if ALL items passed |\n| `items` | `readonly ChecklistItemResult[]` | Results for every item, in execution order |\n| `failedItems` | `readonly ChecklistItemResult[]` | Subset where `passed` is false |\n\n### Functions\n\n#### `createChecklistItem(name: string, validate: () => Promise<ChecklistItemResult>): ChecklistItem`\n\nCreates a frozen checklist item from a name and an async validation function. See `RULE-LCHK-4`.\n\n#### `runChecklist(items: readonly ChecklistItem[]): Promise<ChecklistResult>`\n\nRuns every item sequentially and aggregates results. All items are always executed regardless of individual pass/fail — the full picture is always reported.\n\nThrows `ChecklistError` if `items` is empty.\n\nSee `RULE-LCHK-1`, `RULE-LCHK-2`, `RULE-LCHK-3`.\n\n#### `createDefaultChecklist(): readonly ChecklistItem[]`\n\nCreates the default landing checklist with 4 placeholder validators (Tests, Lint, Documentation, Build). Each placeholder always passes — projects override these with real implementations.\n\nSee `RULE-LCHK-4`.\n\n## Usage\n\n```typescript\nimport { runChecklist, createChecklistItem, createDefaultChecklist } from \"@airtrafficcontrol/checklist\";\n\n// Run the default checklist\nconst defaults = createDefaultChecklist();\nconst result = await runChecklist(defaults);\nconsole.log(result.passed); // true (all placeholders pass)\n\n// Create a custom checklist item\nconst testsItem = createChecklistItem(\"Tests\", async () => {\n  const passed = await runTestSuite();\n  return { name: \"Tests\", passed, message: passed ? \"All tests pass\" : \"3 failures\" };\n});\n\n// Run a custom checklist\nconst customResult = await runChecklist([testsItem]);\nif (!customResult.passed) {\n  console.log(\"Go-around required:\", customResult.failedItems);\n}\n```\n\n## Specification Rules\n\n| Rule | Description |\n|---|---|\n| `RULE-LCHK-1` | Checklist is executed by the pilot holding controls |\n| `RULE-LCHK-2` | `passed` is true only if every item passed |\n| `RULE-LCHK-3` | A false result means a go-around is required |\n| `RULE-LCHK-4` | The checklist is project-configurable |\n\n## Dependencies\n\n| Package | Purpose |\n|---|---|\n| `@airtrafficcontrol/types` | Domain types |\n| `@airtrafficcontrol/errors` | `ChecklistError` |\n\n## Related Packages\n\n- [`@airtrafficcontrol/errors`](../errors/) — `ChecklistError` thrown on empty checklists\n- [`@airtrafficcontrol/tower`](../tower/) — Tower verifies checklist passed before granting clearance\n- [`@airtrafficcontrol/daemon`](../daemon/) — Daemon runs the checklist pipeline\n","readmeFilename":"README.md","_rev":"1-5da345e43a7a29b3429868f98d24a06c"}