ReviewOS

also looking at this

craft-native/craft

fix(capabilities): stop the channel manifest claiming knowledge it does not have

#68
Merged chris wants to merge fix/capability-channels into main
15 files +227 -67
packages/typescript/src/types.tsmodified+10-5
Changes to packages/typescript/src/types.ts
@@ -1247,13 +1247,18 @@ export interface CapabilityNamespace {
12471247export interface CraftCapabilities {
12481248 namespaces: Record<string, CapabilityNamespace>
12491249 /**
1250 * Every `craft:*` event channel, and whether anything native emits on it.
1250 * Every `craft:*` event channel, and what craft can say about it.
12511251 *
1252 * A `false` here means subscribing would work and never fire — which cannot
1253 * be derived from the action tables, so it is tracked separately by the
1254 * emitters themselves.
1252 * `'live'` means something in this build took out a permit to emit on it.
1253 * `'unknown'` means craft cannot prove it either way — subscribe and see, and
1254 * do **not** disable a feature over it.
1255 *
1256 * There is deliberately no `'dead'`. Craft cannot establish absence: the
1257 * `craft:window:*` names are composed in JavaScript from
1258 * `__craftDeliverWindowEvent('focus')`, so no source scan finds the literal
1259 * even though the emitter is right there.
12551260 */
1256 channels: Record<string, boolean>
1261 channels: Record<string, 'live' | 'unknown'>
12571262}
12581263
12591264