Declare an add-on's service. Returns the declaration itself, so the object an author wrote
is the one the export carries and the one the UI's types read; throws with the reason when
it is not one micaOS would accept, so the mistake surfaces where it was made rather than as
an invalid_args from the export.
Deep-frozen. The id is traced from this literal (the SDK's permissions scan reads it), so
nothing may change it afterwards: journal.id = 'other' throws in strict mode and does
nothing otherwise, and so does any write to an action or a field.
MICA-308: an add-on's server half, declared once.
defineAddonServiceis the object an add-on's own FiveM resource handsexports.mica:RegisterService, and the oneuseService(declaration)types its calls from;addonOutput<T>()attaches an action's answer type andaddonError(message)is the refusal a handler answers with. All three are plain functions over plain data out of@mica/shared/addonService, with no state and no I/O, so they bundle into a sandboxed add-on unchanged.