ReviewOS

also looking at this

stacks/drone

feat: add shared-clock scoped vehicle simulation sessions

#98
Merged chris wants to merge codex/cargo-fleet-runtime into main
42 files +2764 -127
docs/api.mdmodified+19-0
Changes to docs/api.md
@@ -38,6 +38,25 @@ forgetting a lease, not a guaranteed real-time deadline. Do not automatically re
3838without independently checking operator authority. `close()` is idempotent. The SITL example has
3939a hard 30-second duration and a deliberately artificial target.
4040
41## Modeled cargo missions
42
43The cargo modules expose the owned runtime directly, without an external-autopilot dependency:
44
45- `planCargoDelivery(configuration)` in `resources/functions/drone/cargo/plan.ts` captures a
46 complete declaration and validates the normal/alternate mission graph and declared reserve.
47- `simulateCargoDelivery({ configuration, scenario? })` in `cargo/delivery.ts` under the same
48 drone folder runs its actual loaded rigid body through the raw sensors, estimator, mission,
49 controls, authority and watchdog. Omitting configuration selects only the closed named fixture.
50- `cargoDeliverySummary(run)` produces a bounded compact projection, preserving actual mission,
51 custody and host-loss outcomes. A matched failure demonstration is not delivery completion.
52- `createCargoDeliveryCoordinator(declaration, modeledMechanism)` in `cargo/coordinator.ts`
53 implements `VehiclePayloadPort`, captured readiness and idempotent cancellation. Its adapter
54 contract is synchronous and explicitly modeled, with no built-in hardware I/O.
55
56The [cargo guide](cargo-delivery.md) defines the flat synthetic origin, finite load/route bounds,
57one-release and receipt semantics, phase-bound faults, native CLI exit codes and remaining
58fleet/physical/BVLOS work. Budgets are declared power ceilings, not electrical measurements.
59
4160## Target sources
4261
4362`createGpsTargetSource({ targetId, origin, maxSpeedMps?, now? })` converts trusted phone or GNSS fixes