FS FormScript

Offline

Offline without a double charge

An offline retry sends a payment twice. A rate on screen was computed from a stale cache.

what this buys you

  • Skip by default
  • Failed is not empty
  • No trap states
  • Sources declare a cache lifetime
Language specification 1.0 · level 3 of 5

Promise. Actions declare a conflict policy; the default is skip, so a payment is never re-sent by accident. Sources declare a cache lifetime. A failed source is a different state from a source that returned nothing. Pending options do not trap the person as “empty.”

Skip by default

An action declares a conflict policy, and the default is skip. A payment is never re-sent by accident.

Failed is not empty

A source that errored is a different state from a source that returned nothing. The UI can say which happened.

No trap states

Pending options do not present as “empty”, so nobody is asked to pick from a list that has not arrived yet.

forms
form loan version = "1.0" {
  field annual_income {
    type = number
    validate { min = 0 }
  }
  field monthly {
    type = number
    value = pmt(0.05 / 12, 60, annual_income)
  }
  output {
    annual_income: number
    monthly: number
  }
}

The host stores the queue and applies the conflict policy; the document keeps the payment figure honest when the device comes back online.

Boundary. The engine does not open sockets. `@formscript/runtime` builds the requests; the host supplies transport, clock, and the durable store. Today’s CLI does not fetch sources or drive actions.