Tell Model Runtime (Model-Only API)

Summary

The tell runtime now uses class-based models only.

Applications are registered as HyperApplication objects and resolved with built-in strict defaults. There is no low-level adapter interface in this design.

Public API

Register an application model:

$runtime = new HyperScript();
$runtime->registerModel('mail', $mailApp);

Base types: - Hyperphp\Host\HyperModel - Hyperphp\Host\HyperApplication - Hyperphp\Host\HyperCollection (optional helper base)

Default Resolution Rules

Property reads

For key read_status, runtime checks in this order: 1. getReadStatus() 2. isReadStatus() 3. read_status() 4. public property $read_status

If none match, runtime throws an explicit lookup/runtime error.

Property writes

For key read_status, runtime checks in this order: 1. setReadStatus($value) 2. existing public property $read_status

If none match, runtime throws an explicit lookup/runtime error. Dynamic property creation is not performed.

Command calls

For command mark_read, runtime checks: 1. mark_read(...) 2. markRead(...)

Tell specifier resolution

tell inbox uses the same strict read path as property reads on the current tell object.

every <kind> query resolution

  1. If current object has default(), use it.
  2. Otherwise read plural property <kind>s (for message, lookup messages).
  3. Result must be iterable (array or Traversable), otherwise runtime throws.

Design Notes

  • Strict deterministic matching only; no fuzzy lookup.
  • Missing lookups fail fast.
  • Runtime error messages preserve line/column source context.