@flighthq/host 0.5.1-next.1370.903f328

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ # MIT License
2
+
3
+ Copyright (c) 2013-2026 Joshua Granick and other contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # @flighthq/host
2
+
3
+ Portable host interface: host construction, capability queries, and host diagnostics
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install @flighthq/host
9
+ ```
10
+
11
+ Import the supported application-facing API from `@flighthq/host`. The `@flighthq/host/contract` export is the wider package-to-package contract used to compose Flight itself.
12
+
13
+ This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
14
+
15
+ - [Flight project](https://github.com/flighthq/flight)
16
+ - [Source for @flighthq/host@0.5.1-next.1370.903f328](https://github.com/flighthq/flight/tree/903f3289590358eacc20698525e6982da2ab0e9d/packages/host)
17
+ - [License](https://github.com/flighthq/flight/blob/903f3289590358eacc20698525e6982da2ab0e9d/LICENSE.md)
@@ -0,0 +1,5 @@
1
+ export * from './enableHostGuards';
2
+ export * from './host';
3
+ export * from './hostExplain';
4
+ export * from './hostQuery';
5
+ //# sourceMappingURL=contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './enableHostGuards';
2
+ export * from './host';
3
+ export * from './hostExplain';
4
+ export * from './hostQuery';
5
+ //# sourceMappingURL=contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Host } from '@flighthq/types/contract';
2
+ export declare function enableHostGuards(host: Readonly<Host>): void;
3
+ //# sourceMappingURL=enableHostGuards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enableHostGuards.d.ts","sourceRoot":"","sources":["../src/enableHostGuards.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAA2B,MAAM,0BAA0B,CAAC;AAqB9E,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,CAiB3D"}
@@ -0,0 +1,37 @@
1
+ import { logOnce } from '@flighthq/log/contract';
2
+ import { LogLevel } from '@flighthq/types/contract';
3
+ import { explainHostAudioDevice, explainHostAudioMixer, explainHostImage, explainHostInputIngress, explainHostTextSegmenter, explainHostTextShaper, explainHostVideo, } from './hostExplain';
4
+ // Opt-in warnings for a host that is missing a provider Flight packages commonly need. Importing this
5
+ // module is what costs; a build that never diagnoses a host carries neither the sentences nor the
6
+ // @flighthq/log dependency.
7
+ //
8
+ // There is no seam to install and therefore no disableHostGuards or areHostGuardsEnabled: a host is a
9
+ // value built once and never mutated, so the moment of misuse is the moment it is handed over. Auditing
10
+ // it here is the earliest a warning can fire, and logOnce keys per slot, so calling this for two hosts
11
+ // missing the same provider warns once.
12
+ export function enableHostGuards(host) {
13
+ for (const explain of _GUARDED) {
14
+ const explanation = explain(host);
15
+ if (explanation.isPresent)
16
+ continue;
17
+ logOnce(`host:missing:${explanation.group}.${explanation.slot}`, LogLevel.Warn, {
18
+ backends: explanation.backends.map((backend) => `${backend.entryPoint} (${backend.packageName})`),
19
+ group: explanation.group,
20
+ message: explanation.message,
21
+ provider: explanation.provider,
22
+ slot: explanation.slot,
23
+ }, 'host');
24
+ }
25
+ }
26
+ // The guarded set IS the set of per-provider explainers, called rather than re-derived, so a warning and
27
+ // its explain* query cannot disagree about whether a slot is filled or about where to get it.
28
+ const _GUARDED = [
29
+ explainHostAudioDevice,
30
+ explainHostAudioMixer,
31
+ explainHostImage,
32
+ explainHostInputIngress,
33
+ explainHostTextSegmenter,
34
+ explainHostTextShaper,
35
+ explainHostVideo,
36
+ ];
37
+ //# sourceMappingURL=enableHostGuards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enableHostGuards.js","sourceRoot":"","sources":["../src/enableHostGuards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAEvB,sGAAsG;AACtG,kGAAkG;AAClG,4BAA4B;AAC5B,EAAE;AACF,sGAAsG;AACtG,wGAAwG;AACxG,uGAAuG;AACvG,wCAAwC;AACxC,MAAM,UAAU,gBAAgB,CAAC,IAAoB;IACnD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,WAAW,CAAC,SAAS;YAAE,SAAS;QACpC,OAAO,CACL,gBAAgB,WAAW,CAAC,KAAK,IAAI,WAAW,CAAC,IAAI,EAAE,EACvD,QAAQ,CAAC,IAAI,EACb;YACE,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,OAAO,CAAC,UAAU,KAAK,OAAO,CAAC,WAAW,GAAG,CAAC;YACjG,KAAK,EAAE,WAAW,CAAC,KAAK;YACxB,OAAO,EAAE,WAAW,CAAC,OAAO;YAC5B,QAAQ,EAAE,WAAW,CAAC,QAAQ;YAC9B,IAAI,EAAE,WAAW,CAAC,IAAI;SACvB,EACD,MAAM,CACP,CAAC;IACJ,CAAC;AACH,CAAC;AAED,yGAAyG;AACzG,8FAA8F;AAC9F,MAAM,QAAQ,GAAmE;IAC/E,sBAAsB;IACtB,qBAAqB;IACrB,gBAAgB;IAChB,uBAAuB;IACvB,wBAAwB;IACxB,qBAAqB;IACrB,gBAAgB;CACjB,CAAC"}
package/dist/host.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import type { EntityConstruction, EntityWithoutRuntime, Host } from '@flighthq/types/contract';
2
+ export declare function createHost<Capabilities extends Partial<EntityWithoutRuntime<Host>>>(capabilities?: Readonly<Capabilities>): Host & Capabilities;
3
+ export declare function initializeHost<Capabilities extends Partial<EntityWithoutRuntime<Host>>>(out: EntityConstruction<Host & Capabilities>, capabilities: Readonly<Capabilities>): void;
4
+ //# sourceMappingURL=host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAE/F,wBAAgB,UAAU,CAAC,YAAY,SAAS,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,EACjF,YAAY,GAAE,QAAQ,CAAC,YAAY,CAAsB,GACxD,IAAI,GAAG,YAAY,CAIrB;AAED,wBAAgB,cAAc,CAAC,YAAY,SAAS,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,EACrF,GAAG,EAAE,kBAAkB,CAAC,IAAI,GAAG,YAAY,CAAC,EAC5C,YAAY,EAAE,QAAQ,CAAC,YAAY,CAAC,GACnC,IAAI,CA2BN"}
package/dist/host.js ADDED
@@ -0,0 +1,35 @@
1
+ import { allocateEntity, finishEntity } from '@flighthq/entity/contract';
2
+ export function createHost(capabilities = {}) {
3
+ const out = allocateEntity();
4
+ initializeHost(out, capabilities);
5
+ return finishEntity(out);
6
+ }
7
+ export function initializeHost(out, capabilities) {
8
+ out.accessibility = (capabilities.accessibility ?? {});
9
+ out.app = (capabilities.app ?? {});
10
+ out.clipboard = (capabilities.clipboard ?? {});
11
+ out.connectivity = (capabilities.connectivity ?? {});
12
+ out.dialog = (capabilities.dialog ?? {});
13
+ out.graphics = (capabilities.graphics ?? {});
14
+ out.input = (capabilities.input ?? {});
15
+ out.ipc = (capabilities.ipc ?? {});
16
+ out.media = (capabilities.media ?? {});
17
+ out.menu = (capabilities.menu ?? {});
18
+ out.midi = (capabilities.midi ?? {});
19
+ out.net = (capabilities.net ?? {});
20
+ out.notification = (capabilities.notification ?? {});
21
+ out.power = (capabilities.power ?? {});
22
+ out.protocol = (capabilities.protocol ?? {});
23
+ out.screen = (capabilities.screen ?? {});
24
+ out.share = (capabilities.share ?? {});
25
+ out.shell = (capabilities.shell ?? {});
26
+ out.shortcut = (capabilities.shortcut ?? {});
27
+ out.storage = (capabilities.storage ?? {});
28
+ out.system = (capabilities.system ?? {});
29
+ out.text = (capabilities.text ?? {});
30
+ out.tray = (capabilities.tray ?? {});
31
+ out.ui = (capabilities.ui ?? {});
32
+ out.updater = (capabilities.updater ?? {});
33
+ out.window = (capabilities.window ?? {});
34
+ }
35
+ //# sourceMappingURL=host.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host.js","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAGzE,MAAM,UAAU,UAAU,CACxB,eAAuC,EAAkB;IAEzD,MAAM,GAAG,GAAG,cAAc,EAAuB,CAAC;IAClD,cAAc,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAClC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC;AAC3B,CAAC;AAED,MAAM,UAAU,cAAc,CAC5B,GAA4C,EAC5C,YAAoC;IAEpC,GAAG,CAAC,aAAa,GAAG,CAAC,YAAY,CAAC,aAAa,IAAI,EAAE,CAA0B,CAAC;IAChF,GAAG,CAAC,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,EAAE,CAAgB,CAAC;IAClD,GAAG,CAAC,SAAS,GAAG,CAAC,YAAY,CAAC,SAAS,IAAI,EAAE,CAAsB,CAAC;IACpE,GAAG,CAAC,YAAY,GAAG,CAAC,YAAY,CAAC,YAAY,IAAI,EAAE,CAAyB,CAAC;IAC7E,GAAG,CAAC,MAAM,GAAG,CAAC,YAAY,CAAC,MAAM,IAAI,EAAE,CAAmB,CAAC;IAC3D,GAAG,CAAC,QAAQ,GAAG,CAAC,YAAY,CAAC,QAAQ,IAAI,EAAE,CAAqB,CAAC;IACjE,GAAG,CAAC,KAAK,GAAG,CAAC,YAAY,CAAC,KAAK,IAAI,EAAE,CAAkB,CAAC;IACxD,GAAG,CAAC,GAAG,GAAG,CAAC,YAAY,CAAC,GAAG,IAAI,EAAE,CAAgB,CAAC;IAClD,GAAG,CAAC,KAAK,GAAG,CAAC,YAAY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CAAC;IAC/C,GAAG,CAAC,OAAO,GAAG,CAAC,YAAY,CAAC,OAAO,IAAI,EAAE,CAAoB,CAAC;IAC9D,GAAG,CAAC,MAAM,GAAG,CAAC,YAAY,CAAC,MAAM,IAAI,EAAE,CAAmB,CAAC;AAC7D,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { Host, HostExplanation, HostProviderExplanation } from '@flighthq/types/contract';
2
+ export declare function explainHost(host: Readonly<Host>): HostExplanation;
3
+ export declare function explainHostAudioDevice(host: Readonly<Host>): HostProviderExplanation;
4
+ export declare function explainHostAudioMixer(host: Readonly<Host>): HostProviderExplanation;
5
+ export declare function explainHostImage(host: Readonly<Host>): HostProviderExplanation;
6
+ export declare function explainHostInputIngress(host: Readonly<Host>): HostProviderExplanation;
7
+ export declare function explainHostTextSegmenter(host: Readonly<Host>): HostProviderExplanation;
8
+ export declare function explainHostTextShaper(host: Readonly<Host>): HostProviderExplanation;
9
+ export declare function explainHostVideo(host: Readonly<Host>): HostProviderExplanation;
10
+ //# sourceMappingURL=hostExplain.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hostExplain.d.ts","sourceRoot":"","sources":["../src/hostExplain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EAEJ,eAAe,EAGf,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAgBlC,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,eAAe,CAmBjE;AAGD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,uBAAuB,CAEpF;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,uBAAuB,CAEnF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,uBAAuB,CAE9E;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,uBAAuB,CAErF;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,uBAAuB,CAEtF;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,uBAAuB,CAEnF;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,uBAAuB,CAE9E"}
@@ -0,0 +1,167 @@
1
+ // Pull queries over a Host: what it provides, what it does not, and — for the slots whose absence is a
2
+ // common and confusing failure — where to get the missing provider. Plain data, no logging; the active
3
+ // counterpart is enableHostGuards, which reads these same tables so a warning cannot contradict a query.
4
+ //
5
+ // COVERAGE is the same subset hostQuery.ts exposes accessors for: a provider slot earns a row when a
6
+ // Flight package takes that provider as a function parameter. It is not every optional slot on every
7
+ // group, so a slot outside it is reported neither present nor missing — explainHost's `groups` is the
8
+ // half that sees everything, because it enumerates the host object rather than a table.
9
+ //
10
+ // The maintenance seam: adding a getHost*/hasHost* pair without adding its COVERAGE row leaves the new
11
+ // slot invisible to explainHost and to the guards. hostExplain.test.ts fails when the two disagree.
12
+ // Reports what a host provides. `groups` is enumerated from the host object at call time and covers every
13
+ // capability group it carries; `providers` is the covered-slot census, present and missing alike.
14
+ export function explainHost(host) {
15
+ const groups = [];
16
+ for (const [group, value] of Object.entries(host)) {
17
+ if (typeof value !== 'object' || value === null)
18
+ continue;
19
+ const isProvider = _PROVIDER_GROUPS.has(group);
20
+ const slots = isProvider
21
+ ? []
22
+ : Object.entries(value)
23
+ .filter((entry) => entry[1] !== undefined && entry[1] !== null)
24
+ .map((entry) => entry[0]);
25
+ groups.push({ group, isProvider, slots });
26
+ }
27
+ const providers = _COVERAGE.map((entry) => ({
28
+ group: entry.group,
29
+ isPresent: _isSlotPresent(host, entry.group, entry.slot),
30
+ provider: entry.provider,
31
+ slot: entry.slot,
32
+ }));
33
+ return { groups, providers };
34
+ }
35
+ // Why getHostAudioDevice returned null, and which package supplies the provider it wanted.
36
+ export function explainHostAudioDevice(host) {
37
+ return _explainSlot(host, 'media', 'audioDevice');
38
+ }
39
+ export function explainHostAudioMixer(host) {
40
+ return _explainSlot(host, 'media', 'audioMixer');
41
+ }
42
+ export function explainHostImage(host) {
43
+ return _explainSlot(host, 'graphics', 'image');
44
+ }
45
+ export function explainHostInputIngress(host) {
46
+ return _explainSlot(host, 'input', 'ingress');
47
+ }
48
+ export function explainHostTextSegmenter(host) {
49
+ return _explainSlot(host, 'text', 'segmenter');
50
+ }
51
+ export function explainHostTextShaper(host) {
52
+ return _explainSlot(host, 'text', 'shaper');
53
+ }
54
+ export function explainHostVideo(host) {
55
+ return _explainSlot(host, 'media', 'video');
56
+ }
57
+ function _isSlotPresent(host, group, slot) {
58
+ const capabilities = host[group];
59
+ if (typeof capabilities !== 'object' || capabilities === null)
60
+ return false;
61
+ return capabilities[slot] != null;
62
+ }
63
+ // The explanation the guard layer emits and the explainers return, built once so both say the same thing.
64
+ function _explainSlot(host, group, slot) {
65
+ const coverage = _COVERAGE.find((entry) => entry.group === group && entry.slot === slot);
66
+ const remedy = _REMEDIES[`${group}.${slot}`];
67
+ const isPresent = _isSlotPresent(host, group, slot);
68
+ const provider = coverage?.provider ?? '';
69
+ const accessor = `get${provider.slice(0, -'Provider'.length)}`;
70
+ const message = isPresent
71
+ ? `${accessor}: host.${group}.${slot} is present`
72
+ : `${accessor}: host.${group}.${slot} is absent, so ${remedy?.consequence ?? 'the capability is unavailable'} — ${remedy?.fix ?? 'build the host from a @flighthq/host-* package that provides it'}`;
73
+ return {
74
+ backends: remedy?.backends ?? [],
75
+ group,
76
+ isPresent,
77
+ message,
78
+ provider,
79
+ slot,
80
+ };
81
+ }
82
+ // `Host.window` holds a provider directly rather than a group of provider slots. Listing its method names
83
+ // as "slots" would report operations as capabilities, so it is named here and reported with none. The
84
+ // seam: a second provider-at-group-position in Host must gain a name here or it reports its methods.
85
+ const _PROVIDER_GROUPS = new Set(['window']);
86
+ const _COVERAGE = [
87
+ { group: 'clipboard', provider: 'HostClipboardFormatsProvider', slot: 'formats' },
88
+ { group: 'graphics', provider: 'HostBitmapEncodeProvider', slot: 'bitmapEncode' },
89
+ { group: 'graphics', provider: 'HostBitmapReadbackProvider', slot: 'bitmapReadback' },
90
+ { group: 'graphics', provider: 'HostImageProvider', slot: 'image' },
91
+ { group: 'graphics', provider: 'HostWgpuProvider', slot: 'wgpuHost' },
92
+ { group: 'input', provider: 'HostHapticsProvider', slot: 'haptics' },
93
+ { group: 'input', provider: 'HostInputIngressProvider', slot: 'ingress' },
94
+ { group: 'input', provider: 'HostSoftKeyboardInfoProvider', slot: 'softKeyboardInfo' },
95
+ { group: 'media', provider: 'HostAudioDeviceProvider', slot: 'audioDevice' },
96
+ { group: 'media', provider: 'HostAudioMixerProvider', slot: 'audioMixer' },
97
+ { group: 'media', provider: 'HostVideoProvider', slot: 'video' },
98
+ { group: 'net', provider: 'HostNetProvider', slot: 'http' },
99
+ { group: 'net', provider: 'HostSocketProvider', slot: 'socket' },
100
+ { group: 'notification', provider: 'HostNotificationPermissionProvider', slot: 'permission' },
101
+ { group: 'power', provider: 'HostPowerKeepAwakeProvider', slot: 'keepAwake' },
102
+ { group: 'screen', provider: 'HostScreenQueryProvider', slot: 'query' },
103
+ { group: 'storage', provider: 'HostFileSystemProvider', slot: 'fileSystem' },
104
+ { group: 'storage', provider: 'HostStorageProvider', slot: 'local' },
105
+ { group: 'storage', provider: 'HostStoragePersistenceQueryProvider', slot: 'persistenceQuery' },
106
+ { group: 'system', provider: 'HostDeviceProvider', slot: 'device' },
107
+ { group: 'system', provider: 'HostGeolocationProvider', slot: 'geolocation' },
108
+ { group: 'system', provider: 'HostLifecycleProvider', slot: 'lifecycle' },
109
+ { group: 'system', provider: 'HostPlatformProvider', slot: 'platform' },
110
+ { group: 'system', provider: 'HostSensorsProvider', slot: 'sensors' },
111
+ { group: 'text', provider: 'HostFontLoadingProvider', slot: 'fontLoading' },
112
+ { group: 'text', provider: 'HostGlyphRasterizerProvider', slot: 'glyphRasterizer' },
113
+ { group: 'text', provider: 'HostTextSegmenterProvider', slot: 'segmenter' },
114
+ { group: 'text', provider: 'HostTextShaperProvider', slot: 'shaper' },
115
+ ];
116
+ const _WEB_HOST = {
117
+ entryPoint: 'webHost',
118
+ packageName: '@flighthq/host-web',
119
+ platform: 'Web',
120
+ };
121
+ // Only the slots whose absence is a common, confusing failure carry prose and a source. Each `fix` names
122
+ // every `entryPoint` in `backends` — hostExplain.test.ts asserts that, so the sentence and the structured
123
+ // data cannot drift apart.
124
+ const _REMEDIES = {
125
+ 'graphics.image': {
126
+ backends: [_WEB_HOST],
127
+ consequence: 'nothing can decode an image or read its dimensions',
128
+ fix: 'build the host from webHost in @flighthq/host-web',
129
+ },
130
+ 'input.ingress': {
131
+ backends: [_WEB_HOST],
132
+ consequence: 'no pointer, key, or wheel event reaches the input manager',
133
+ fix: 'build the host from webHost in @flighthq/host-web',
134
+ },
135
+ 'media.audioDevice': {
136
+ backends: [_WEB_HOST],
137
+ consequence: 'no audio can be decoded or played',
138
+ fix: 'build the host from webHost in @flighthq/host-web',
139
+ },
140
+ 'media.audioMixer': {
141
+ backends: [_WEB_HOST],
142
+ consequence: 'sound transforms and mixer routing are inert',
143
+ fix: 'build the host from webHost in @flighthq/host-web',
144
+ },
145
+ 'media.video': {
146
+ backends: [_WEB_HOST],
147
+ consequence: 'nothing can decode or present video',
148
+ fix: 'build the host from webHost in @flighthq/host-web',
149
+ },
150
+ 'text.segmenter': {
151
+ backends: [{ entryPoint: 'createWebTextSegmenterBackend', packageName: '@flighthq/textsegment', platform: 'Web' }],
152
+ consequence: 'grapheme, word, and sentence breaking fall back to code-unit boundaries',
153
+ fix: "pass createWebTextSegmenterBackend() from @flighthq/textsegment into createHost's text group",
154
+ },
155
+ 'text.shaper': {
156
+ backends: [
157
+ {
158
+ entryPoint: 'createCanvasTextShaperBackend',
159
+ packageName: '@flighthq/textshaper-canvas',
160
+ platform: 'Canvas 2D',
161
+ },
162
+ ],
163
+ consequence: 'text cannot be measured or shaped and lays out at zero width',
164
+ fix: "pass createCanvasTextShaperBackend() from @flighthq/textshaper-canvas into createHost's text group",
165
+ },
166
+ };
167
+ //# sourceMappingURL=hostExplain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hostExplain.js","sourceRoot":"","sources":["../src/hostExplain.ts"],"names":[],"mappings":"AASA,uGAAuG;AACvG,uGAAuG;AACvG,yGAAyG;AACzG,EAAE;AACF,qGAAqG;AACrG,qGAAqG;AACrG,sGAAsG;AACtG,wFAAwF;AACxF,EAAE;AACF,uGAAuG;AACvG,oGAAoG;AAEpG,0GAA0G;AAC1G,kGAAkG;AAClG,MAAM,UAAU,WAAW,CAAC,IAAoB;IAC9C,MAAM,MAAM,GAAqC,EAAE,CAAC;IACpD,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QAClD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;YAAE,SAAS;QAC1D,MAAM,UAAU,GAAG,gBAAgB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QAC/C,MAAM,KAAK,GAAG,UAAU;YACtB,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,KAAgC,CAAC;iBAC7C,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;iBAC9D,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAChC,MAAM,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;IAC5C,CAAC;IACD,MAAM,SAAS,GAA2B,SAAS,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oGAAoG;KAC1G;CACF,CAAC"}
@@ -0,0 +1,58 @@
1
+ import type { Host, HostAudioDeviceProvider, HostAudioMixerProvider, HostBitmapEncodeProvider, HostBitmapReadbackProvider, HostClipboardFormatsProvider, HostDeviceProvider, HostFileSystemProvider, HostFontLoadingProvider, HostGeolocationProvider, HostGlyphRasterizerProvider, HostHapticsProvider, HostImageProvider, HostInputIngressProvider, HostLifecycleProvider, HostNetProvider, HostNotificationPermissionProvider, HostPlatformProvider, HostPowerKeepAwakeProvider, HostScreenQueryProvider, HostSensorsProvider, HostSocketProvider, HostSoftKeyboardInfoProvider, HostStorageProvider, HostStoragePersistenceQueryProvider, HostTextSegmenterProvider, HostTextShaperProvider, HostVideoProvider, HostWgpuProvider } from '@flighthq/types/contract';
2
+ export declare function getHostAudioDevice(host: Readonly<Host>): HostAudioDeviceProvider | null;
3
+ export declare function getHostAudioMixer(host: Readonly<Host>): HostAudioMixerProvider | null;
4
+ export declare function getHostBitmapEncode(host: Readonly<Host>): HostBitmapEncodeProvider | null;
5
+ export declare function getHostBitmapReadback(host: Readonly<Host>): HostBitmapReadbackProvider | null;
6
+ export declare function getHostClipboardFormats(host: Readonly<Host>): HostClipboardFormatsProvider | null;
7
+ export declare function getHostDevice(host: Readonly<Host>): HostDeviceProvider | null;
8
+ export declare function getHostFileSystem(host: Readonly<Host>): HostFileSystemProvider | null;
9
+ export declare function getHostFontLoading(host: Readonly<Host>): HostFontLoadingProvider | null;
10
+ export declare function getHostGeolocation(host: Readonly<Host>): HostGeolocationProvider | null;
11
+ export declare function getHostGlyphRasterizer(host: Readonly<Host>): HostGlyphRasterizerProvider | null;
12
+ export declare function getHostHaptics(host: Readonly<Host>): HostHapticsProvider | null;
13
+ export declare function getHostImage(host: Readonly<Host>): HostImageProvider | null;
14
+ export declare function getHostInputIngress(host: Readonly<Host>): HostInputIngressProvider | null;
15
+ export declare function getHostLifecycle(host: Readonly<Host>): HostLifecycleProvider | null;
16
+ export declare function getHostNet(host: Readonly<Host>): HostNetProvider | null;
17
+ export declare function getHostNotificationPermission(host: Readonly<Host>): HostNotificationPermissionProvider | null;
18
+ export declare function getHostPlatform(host: Readonly<Host>): HostPlatformProvider | null;
19
+ export declare function getHostPowerKeepAwake(host: Readonly<Host>): HostPowerKeepAwakeProvider | null;
20
+ export declare function getHostScreenQuery(host: Readonly<Host>): HostScreenQueryProvider | null;
21
+ export declare function getHostSensors(host: Readonly<Host>): HostSensorsProvider | null;
22
+ export declare function getHostSocket(host: Readonly<Host>): HostSocketProvider | null;
23
+ export declare function getHostSoftKeyboardInfo(host: Readonly<Host>): HostSoftKeyboardInfoProvider | null;
24
+ export declare function getHostStorage(host: Readonly<Host>): HostStorageProvider | null;
25
+ export declare function getHostStoragePersistenceQuery(host: Readonly<Host>): HostStoragePersistenceQueryProvider | null;
26
+ export declare function getHostTextSegmenter(host: Readonly<Host>): HostTextSegmenterProvider | null;
27
+ export declare function getHostTextShaper(host: Readonly<Host>): HostTextShaperProvider | null;
28
+ export declare function getHostVideo(host: Readonly<Host>): HostVideoProvider | null;
29
+ export declare function getHostWgpu(host: Readonly<Host>): HostWgpuProvider | null;
30
+ export declare function hasHostAudioDevice(host: Readonly<Host>): boolean;
31
+ export declare function hasHostAudioMixer(host: Readonly<Host>): boolean;
32
+ export declare function hasHostBitmapEncode(host: Readonly<Host>): boolean;
33
+ export declare function hasHostBitmapReadback(host: Readonly<Host>): boolean;
34
+ export declare function hasHostClipboardFormats(host: Readonly<Host>): boolean;
35
+ export declare function hasHostDevice(host: Readonly<Host>): boolean;
36
+ export declare function hasHostFileSystem(host: Readonly<Host>): boolean;
37
+ export declare function hasHostFontLoading(host: Readonly<Host>): boolean;
38
+ export declare function hasHostGeolocation(host: Readonly<Host>): boolean;
39
+ export declare function hasHostGlyphRasterizer(host: Readonly<Host>): boolean;
40
+ export declare function hasHostHaptics(host: Readonly<Host>): boolean;
41
+ export declare function hasHostImage(host: Readonly<Host>): boolean;
42
+ export declare function hasHostInputIngress(host: Readonly<Host>): boolean;
43
+ export declare function hasHostLifecycle(host: Readonly<Host>): boolean;
44
+ export declare function hasHostNet(host: Readonly<Host>): boolean;
45
+ export declare function hasHostNotificationPermission(host: Readonly<Host>): boolean;
46
+ export declare function hasHostPlatform(host: Readonly<Host>): boolean;
47
+ export declare function hasHostPowerKeepAwake(host: Readonly<Host>): boolean;
48
+ export declare function hasHostScreenQuery(host: Readonly<Host>): boolean;
49
+ export declare function hasHostSensors(host: Readonly<Host>): boolean;
50
+ export declare function hasHostSocket(host: Readonly<Host>): boolean;
51
+ export declare function hasHostSoftKeyboardInfo(host: Readonly<Host>): boolean;
52
+ export declare function hasHostStorage(host: Readonly<Host>): boolean;
53
+ export declare function hasHostStoragePersistenceQuery(host: Readonly<Host>): boolean;
54
+ export declare function hasHostTextSegmenter(host: Readonly<Host>): boolean;
55
+ export declare function hasHostTextShaper(host: Readonly<Host>): boolean;
56
+ export declare function hasHostVideo(host: Readonly<Host>): boolean;
57
+ export declare function hasHostWgpu(host: Readonly<Host>): boolean;
58
+ //# sourceMappingURL=hostQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hostQuery.d.ts","sourceRoot":"","sources":["../src/hostQuery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,IAAI,EACJ,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,0BAA0B,EAC1B,4BAA4B,EAC5B,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,EAC3B,mBAAmB,EACnB,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,EACrB,eAAe,EACf,kCAAkC,EAClC,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,mBAAmB,EACnB,kBAAkB,EAClB,4BAA4B,EAC5B,mBAAmB,EACnB,mCAAmC,EACnC,yBAAyB,EACzB,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,0BAA0B,CAAC;AAclC,wBAAg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Q,CAAC,IAAI,CAAC,GAAG,OAAO,CAE1D;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAG,OAAO,CAEzD"}
@@ -0,0 +1,180 @@
1
+ // Typed accessors for the provider slots a Flight package actually takes as a function parameter. Each
2
+ // is named after the provider interface it returns — `HostVideoProvider` -> `getHostVideo` — so the name
3
+ // says both what comes back and that a Host is where it comes from, and typing `getHost` in an editor
4
+ // lists the capabilities a host can carry.
5
+ //
6
+ // The group access is optional-chained even though `Host` declares every group non-optional: these are
7
+ // the diagnostic tier, reached exactly when a host is suspected of being malformed, and a structurally
8
+ // built stand-in with a group missing must produce `null` rather than a TypeError.
9
+ //
10
+ // Coverage is deliberately a subset of every optional slot on every group; `explainHost` reports the same
11
+ // subset and hostExplain.ts states how it was drawn.
12
+ export function getHostAudioDevice(host) {
13
+ return host.media?.audioDevice ?? null;
14
+ }
15
+ export function getHostAudioMixer(host) {
16
+ return host.media?.audioMixer ?? null;
17
+ }
18
+ export function getHostBitmapEncode(host) {
19
+ return host.graphics?.bitmapEncode ?? null;
20
+ }
21
+ export function getHostBitmapReadback(host) {
22
+ return host.graphics?.bitmapReadback ?? null;
23
+ }
24
+ export function getHostClipboardFormats(host) {
25
+ return host.clipboard?.formats ?? null;
26
+ }
27
+ export function getHostDevice(host) {
28
+ return host.system?.device ?? null;
29
+ }
30
+ export function getHostFileSystem(host) {
31
+ return host.storage?.fileSystem ?? null;
32
+ }
33
+ export function getHostFontLoading(host) {
34
+ return host.text?.fontLoading ?? null;
35
+ }
36
+ export function getHostGeolocation(host) {
37
+ return host.system?.geolocation ?? null;
38
+ }
39
+ export function getHostGlyphRasterizer(host) {
40
+ return host.text?.glyphRasterizer ?? null;
41
+ }
42
+ export function getHostHaptics(host) {
43
+ return host.input?.haptics ?? null;
44
+ }
45
+ export function getHostImage(host) {
46
+ return host.graphics?.image ?? null;
47
+ }
48
+ export function getHostInputIngress(host) {
49
+ return host.input?.ingress ?? null;
50
+ }
51
+ export function getHostLifecycle(host) {
52
+ return host.system?.lifecycle ?? null;
53
+ }
54
+ export function getHostNet(host) {
55
+ return host.net?.http ?? null;
56
+ }
57
+ export function getHostNotificationPermission(host) {
58
+ return host.notification?.permission ?? null;
59
+ }
60
+ export function getHostPlatform(host) {
61
+ return host.system?.platform ?? null;
62
+ }
63
+ export function getHostPowerKeepAwake(host) {
64
+ return host.power?.keepAwake ?? null;
65
+ }
66
+ export function getHostScreenQuery(host) {
67
+ return host.screen?.query ?? null;
68
+ }
69
+ export function getHostSensors(host) {
70
+ return host.system?.sensors ?? null;
71
+ }
72
+ export function getHostSocket(host) {
73
+ return host.net?.socket ?? null;
74
+ }
75
+ export function getHostSoftKeyboardInfo(host) {
76
+ return host.input?.softKeyboardInfo ?? null;
77
+ }
78
+ export function getHostStorage(host) {
79
+ return host.storage?.local ?? null;
80
+ }
81
+ export function getHostStoragePersistenceQuery(host) {
82
+ return host.storage?.persistenceQuery ?? null;
83
+ }
84
+ export function getHostTextSegmenter(host) {
85
+ return host.text?.segmenter ?? null;
86
+ }
87
+ export function getHostTextShaper(host) {
88
+ return host.text?.shaper ?? null;
89
+ }
90
+ export function getHostVideo(host) {
91
+ return host.media?.video ?? null;
92
+ }
93
+ export function getHostWgpu(host) {
94
+ return host.graphics?.wgpuHost ?? null;
95
+ }
96
+ export function hasHostAudioDevice(host) {
97
+ return getHostAudioDevice(host) !== null;
98
+ }
99
+ export function hasHostAudioMixer(host) {
100
+ return getHostAudioMixer(host) !== null;
101
+ }
102
+ export function hasHostBitmapEncode(host) {
103
+ return getHostBitmapEncode(host) !== null;
104
+ }
105
+ export function hasHostBitmapReadback(host) {
106
+ return getHostBitmapReadback(host) !== null;
107
+ }
108
+ export function hasHostClipboardFormats(host) {
109
+ return getHostClipboardFormats(host) !== null;
110
+ }
111
+ export function hasHostDevice(host) {
112
+ return getHostDevice(host) !== null;
113
+ }
114
+ export function hasHostFileSystem(host) {
115
+ return getHostFileSystem(host) !== null;
116
+ }
117
+ export function hasHostFontLoading(host) {
118
+ return getHostFontLoading(host) !== null;
119
+ }
120
+ export function hasHostGeolocation(host) {
121
+ return getHostGeolocation(host) !== null;
122
+ }
123
+ export function hasHostGlyphRasterizer(host) {
124
+ return getHostGlyphRasterizer(host) !== null;
125
+ }
126
+ export function hasHostHaptics(host) {
127
+ return getHostHaptics(host) !== null;
128
+ }
129
+ export function hasHostImage(host) {
130
+ return getHostImage(host) !== null;
131
+ }
132
+ export function hasHostInputIngress(host) {
133
+ return getHostInputIngress(host) !== null;
134
+ }
135
+ export function hasHostLifecycle(host) {
136
+ return getHostLifecycle(host) !== null;
137
+ }
138
+ export function hasHostNet(host) {
139
+ return getHostNet(host) !== null;
140
+ }
141
+ export function hasHostNotificationPermission(host) {
142
+ return getHostNotificationPermission(host) !== null;
143
+ }
144
+ export function hasHostPlatform(host) {
145
+ return getHostPlatform(host) !== null;
146
+ }
147
+ export function hasHostPowerKeepAwake(host) {
148
+ return getHostPowerKeepAwake(host) !== null;
149
+ }
150
+ export function hasHostScreenQuery(host) {
151
+ return getHostScreenQuery(host) !== null;
152
+ }
153
+ export function hasHostSensors(host) {
154
+ return getHostSensors(host) !== null;
155
+ }
156
+ export function hasHostSocket(host) {
157
+ return getHostSocket(host) !== null;
158
+ }
159
+ export function hasHostSoftKeyboardInfo(host) {
160
+ return getHostSoftKeyboardInfo(host) !== null;
161
+ }
162
+ export function hasHostStorage(host) {
163
+ return getHostStorage(host) !== null;
164
+ }
165
+ export function hasHostStoragePersistenceQuery(host) {
166
+ return getHostStoragePersistenceQuery(host) !== null;
167
+ }
168
+ export function hasHostTextSegmenter(host) {
169
+ return getHostTextSegmenter(host) !== null;
170
+ }
171
+ export function hasHostTextShaper(host) {
172
+ return getHostTextShaper(host) !== null;
173
+ }
174
+ export function hasHostVideo(host) {
175
+ return getHostVideo(host) !== null;
176
+ }
177
+ export function hasHostWgpu(host) {
178
+ return getHostWgpu(host) !== null;
179
+ }
180
+ //# sourceMappingUR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oB;IAC/C,OAAO,YAAY,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAoB;IAC9C,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;AACpC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { enableHostGuards, explainHost, explainHostAudioDevice, explainHostAudioMixer, explainHostImage, explainHostInputIngress, explainHostTextSegmenter, explainHostTextShaper, explainHostVideo, getHostAudioDevice, getHostAudioMixer, getHostBitmapEncode, getHostBitmapReadback, getHostClipboardFormats, getHostDevice, getHostFileSystem, getHostFontLoading, getHostGeolocation, getHostGlyphRasterizer, getHostHaptics, getHostImage, getHostInputIngress, getHostLifecycle, getHostNet, getHostNotificationPermission, getHostPlatform, getHostPowerKeepAwake, getHostScreenQuery, getHostSensors, getHostSocket, getHostSoftKeyboardInfo, getHostStorage, getHostStoragePersistenceQuery, getHostTextSegmenter, getHostTextShaper, getHostVideo, getHostWgpu, hasHostAudioDevice, hasHostAudioMixer, hasHostBitmapEncode, hasHostBitmapReadback, hasHostClipboardFormats, hasHostDevice, hasHostFileSystem, hasHostFontLoading, hasHostGeolocation, hasHostGlyphRasterizer, hasHostHaptics, hasHostImage, hasHostInputIngress, hasHostLifecycle, hasHostNet, hasHostNotificationPermission, hasHostPlatform, hasHostPowerKeepAwake, hasHostScreenQuery, hasHostSensors, hasHostSocket, hasHostSoftKeyboardInfo, hasHostStorage, hasHostStoragePersistenceQuery, hasHostTextSegmenter, hasHostTextShaper, hasHostVideo, hasHostWgpu, } from './contract';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,EACV,6BAA6B,EAC7B,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,uBAAuB,EACvB,cAAc,EACd,8BAA8B,EAC9B,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACvB,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACd,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,UAAU,EACV,6BAA6B,EAC7B,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,uBAAuB,EACvB,cAAc,EACd,8BAA8B,EAC9B,oBAAoB,EACpB,iBAAiB,EACjB,YAAY,EACZ,WAAW,GACZ,MAAM,YAAY,CAAC"}