oro:diagnostics
oro:diagnostics exposes channels, metrics, and runtime/window diagnostic queries.
Related guides#
Examples#
Publish and subscribe to a diagnostics channel:
import { channel } from 'oro:diagnostics'
const buildChannel = channel('build')
buildChannel.subscribe('step', (message) => {
console.log(message.step)
})
await buildChannel.publish('step', { step: 'bundle-ready' })
API reference#
Module specifiers#
oro:diagnostics
oro:diagnostics/channels
oro:diagnostics/index
oro:diagnostics/metric
oro:diagnostics/runtime
oro:diagnostics/window
TypeScript declarations#
These declarations are generated from the runtime's published TypeScript surface.
oro:diagnostics#
declare module "oro:diagnostics" {
export * from "oro:diagnostics/index";
export default exports;
import * as exports from "oro:diagnostics/index";
}
oro:diagnostics/channels#
declare module "oro:diagnostics/channels" {
/**
* Normalizes a channel name to lower case replacing white space,
* hyphens (-), underscores (_), with dots (.).
* @ignore
*/
export function normalizeName(group: any, name: any): string;
/**
* Used to preallocate a minimum sized array of subscribers for
* a channel.
* @ignore
*/
export const MIN_CHANNEL_SUBSCRIBER_SIZE: 64;
/**
* A general interface for diagnostic channels that can be subscribed to.
*/
export class Channel {
constructor(name: any);
name: any;
group: any;
/**
* Computed subscribers for all channels in this group.
* @type {Array<function>}
*/
get subscribers(): Array<Function>;
/**
* Accessor for determining if channel has subscribers. This
* is always `false` for `Channel instances and `true` for `ActiveChannel`
* instances.
*/
get hasSubscribers(): boolean;
/**
* Computed number of subscribers for this channel.
*/
get length(): number;
/**
* Resets channel state.
* @param {(boolean)} [shouldOrphan = false]
*/
reset(shouldOrphan?: (boolean)): void;
channel(name: any): Channel;
/**
* Adds an `onMessage` subscription callback to the channel.
* @return {boolean}
*/
subscribe(_: any, onMessage: any): boolean;
/**
* Removes an `onMessage` subscription callback from the channel.
* @param {function} onMessage
* @return {boolean}
*/
unsubscribe(_: any, onMessage: Function): boolean;
/**
* A no-op for `Channel` instances. This function always returns `false`.
* @param {string|object} name
* @param {object=} [message]
* @return Promise<boolean>
*/
publish(_name: any, _message?: any): Promise<boolean>;
/**
* Returns a string representation of the `ChannelRegistry`.
* @ignore
*/
toString(): any;
/**
* Iterator interface
* @ignore
*/
get [Symbol.iterator](): any[];
/**
* The `Channel` string tag.
* @ignore
*/
[Symbol.toStringTag](): string;
#private;
}
/**
* An `ActiveChannel` is a prototype implementation for a `Channel`
* that provides an interface what is considered an "active" channel. The
* `hasSubscribers` accessor always returns `true` for this class.
*/
export class ActiveChannel extends Channel {
unsubscribe(onMessage: any): boolean;
/**
* @param {object|any} message
* @return Promise<boolean>
*/
publish(message: object | any): Promise<boolean>;
}
/**
* A container for a grouping of channels that are named and owned
* by this group. A `ChannelGroup` can also be a regular channel.
*/
export class ChannelGroup extends Channel {
/**
* @param {Array<Channel>} channels
* @param {string} name
*/
constructor(name: string, channels: Array<Channel>);
channels: Channel[];
/**
* Subscribe to a channel or selection of channels in this group.
* @param {string} name
* @return {boolean}
*/
subscribe(name: string, onMessage: any): boolean;
/**
* Unsubscribe from a channel or selection of channels in this group.
* @param {string} name
* @return {boolean}
*/
unsubscribe(name: string, onMessage: any): boolean;
/**
* Gets or creates a channel for this group.
* @param {string} name
* @return {Channel}
*/
channel(name: string): Channel;
/**
* Select a test of channels from this group.
* The following syntax is supported:
* - One Channel: `group.channel`
* - All Channels: `*`
* - Many Channel: `group.*`
* - Collections: `['group.a', 'group.b', 'group.c'] or `group.a,group.b,group.c`
* @param {string|Array<string>} keys
* @param {(boolean)} [hasSubscribers = false] - Enforce subscribers in selection
* @return {Array<{name: string, channel: Channel}>}
*/
select(keys: string | Array<string>, hasSubscribers?: (boolean)): Array<{
name: string;
channel: Channel;
}>;
}
/**
* An object mapping of named channels to `WeakRef<Channel>` instances.
*/
export const registry: {
/**
* Subscribes callback `onMessage` to channel of `name`.
* @param {string} name
* @param {function} onMessage
* @return {boolean}
*/
subscribe(name: string, onMessage: Function): boolean;
/**
* Unsubscribes callback `onMessage` from channel of `name`.
* @param {string} name
* @param {function} onMessage
* @return {boolean}
*/
unsubscribe(name: string, onMessage: Function): boolean;
/**
* Predicate to determine if a named channel has subscribers.
* @param {string} name
*/
hasSubscribers(name: string): boolean;
/**
* Get or set a channel by `name`.
* @param {string} name
* @return {Channel}
*/
channel(name: string): Channel;
/**
* Creates a `ChannelGroup` for a set of channels
* @param {string} name
* @param {Array<string>} [channels]
* @return {ChannelGroup}
*/
group(name: string, channels?: Array<string>): ChannelGroup;
/**
* Get a channel by name. The name is normalized.
* @param {string} name
* @return {Channel?}
*/
get(name: string): Channel | null;
/**
* Checks if a channel is known by name. The name is normalized.
* @param {string} name
* @return {boolean}
*/
has(name: string): boolean;
/**
* Set a channel by name. The name is normalized.
* @param {string} name
* @param {Channel} channel
* @return {Channel?}
*/
set(name: string, channel: Channel): Channel | null;
/**
* Removes a channel by `name`
* @return {boolean}
*/
remove(name: any): boolean;
/**
* Returns a string representation of the `ChannelRegistry`.
* @ignore
*/
toString(): any;
/**
* Returns a JSON representation of the `ChannelRegistry`.
* @return {object}
*/
toJSON(): object;
/**
* The `ChannelRegistry` string tag.
* @ignore
*/
[Symbol.toStringTag](): string;
};
export default registry;
}
oro:diagnostics/index#
declare module "oro:diagnostics/index" {
/**
* @param {string} name
* @return {import('./channels.js').Channel}
*/
export function channel(name: string): import("oro:diagnostics/channels").Channel;
export default exports;
import * as exports from "oro:diagnostics/index";
import channels from "oro:diagnostics/channels";
import window from "oro:diagnostics/window";
import runtime from "oro:diagnostics/runtime";
export { channels, window, runtime };
}
oro:diagnostics/metric#
declare module "oro:diagnostics/metric" {
export class Metric {
init(): void;
update(_value: any): void;
destroy(): void;
toJSON(): {};
toString(): string;
[Symbol.iterator](): any;
[Symbol.toStringTag](): string;
}
export default Metric;
}
oro:diagnostics/runtime#
declare module "oro:diagnostics/runtime" {
/**
* @typedef {object} AndroidStartupTiming
* @property {'native-library'|'native-allocation'|'native-extensions'|'process-lifecycle'} phase Fixed native startup phase.
* @property {number} durationMs Monotonic duration; excludes process launch and renderer startup.
*/
/**
* @typedef {object} AndroidLifecycleEvent
* @property {number} index Runtime window index.
* @property {'loading'|'presented'|'ready'|'failed'|'renderer-lost'|'reload'} phase
* @property {number} elapsedMs Monotonic time since the first retained process event.
* @property {number} durationMs Startup elapsed time for presentation/readiness/failure; zero otherwise.
*/
/**
* @typedef {object} AndroidBuildIdentity
* @property {string} nativeVersion Version compiled into the native runtime.
* @property {string} nativeRevision Source revision compiled into the native runtime.
* @property {string} cliVersion CLI that generated this application's init shim.
* @property {string} assetManifestSha256 SHA-256 of asset and build evidence bound into the native init shim; not the APK digest.
* @property {string|null} applicationInputSha256 Staged Android native files, normalized settings, SDK inventory and toolchain input fingerprint; null for older or unbound evidence. APK digest and signing certificate identify the exact compiled artifact.
* @property {number} androidBridgeProtocol Native bridge version.
* @property {number} [nativeCallbacksProtocol] Android compiled callback adapter version; 1 for the native C++ facade.
* @property {number} [nativeRecordsProtocol] Native C++ encrypted record format; distinct from Kotlin v1 storage and migration.
* @property {number} [nativePushJournalRecoveryProtocol] Native installation-scoped unreadable push-journal quarantine protocol.
* @property {number} [nativeServicesProtocol] Owned native service, v1 interoperability and child-execution SDK protocol.
* @property {number} [nativeWorkflowsProtocol] Packaged declarative read-and-notify executor protocol.
* @property {string} abi Compiled architecture.
* @property {boolean} debug
* @property {number} sdk Device SDK.
* @property {number} targetSdk Application target SDK.
* @property {string|null} webViewVersion Installed WebView package version.
* @property {boolean} assetsVerified Whether native startup verified all packaged assets.
* @property {AndroidProcessExits} processExits Redacted, OS-retained exit summaries.
* @property {AndroidLifecycleEvent[]} lifecycleEvents At most 64 process-local timings; no URLs or application payloads.
* @property {AndroidStartupTiming[]} startupTimings At most four native startup phases; no application payloads.
*/
/**
* @typedef {object} AndroidProcessExit
* @property {boolean} buildIdentityKnown False; OS history may predate the running artifact.
* @property {number} reason Android ApplicationExitInfo reason code.
* @property {number} status Exit status code.
* @property {number} timestamp Unix milliseconds.
* @property {number} importance Android process importance.
* @property {number} pssKiB Last recorded proportional memory size.
* @property {number} rssKiB Last recorded resident memory size.
*/
/**
* @typedef {object} AndroidProcessExits
* @property {boolean} available API 30+ system query succeeded.
* @property {AndroidProcessExit[]} entries At most 16 summaries; no descriptions, traces, or process names.
*/
/**
* @typedef {object} RuntimeCapabilities
* @property {boolean} nativeFullscreen Requires Android 11+ and a live foreground window.
* @property {boolean} fullscreenRequiresManagedInsets
* @property {boolean} screenProtection Android FLAG_SECURE, not control of exported content.
* @property {boolean} documentMetadata
* @property {boolean} documentTreeQueries Existing user-selected tree grants only.
* @property {number} documentQueryWorkers
* @property {number} documentQueryDeadlineMs
* @property {boolean} nativeBackgroundCleanup Explicitly enabled native share-prune scheduling.
* @property {boolean} backgroundJavaScript False; arbitrary durable JS execution is unavailable.
* @property {boolean} push Configured optional UnifiedPush transport. Query oro:push for selection and registered handlers; this does not prove server enrollment or delivery.
* @property {boolean} applicationBackHandling Document-owned Back handler with native fallback.
* @property {boolean} periodicDeferredReads Configured periodic native read scheduling.
* @property {boolean} nativeDeferredMaintenance Registered retry-safe cleanup/revocation scheduling; general queued writes remain unavailable.
* @property {boolean} nativeForegroundExecution Configured user-started dataSync executor service; query oro:foreground for current admission and registered executors.
* @property {boolean} nativeContinuousExecution Configured user-started specialUse monitoring; query oro:foreground/continuous for current admission.
* @property {boolean} nativeTransactionalRecords Native-only encrypted identity-bound CAS records and migration; not exposed through JavaScript.
* @property {boolean} nativeCoordination Native-only conditional intents, records and uncertain-outcome coordination; external authorization remains application-owned.
* @property {boolean} biometricSecretUnlock
* @property {boolean} namedLauncherDestinations
* @property {boolean} nativeDeferredReads Configured native read/reconciliation scheduler; query registered executors separately.
* @property {boolean} deferredWrites False; queued mutation replay is not supported.
* @property {boolean} webAuthentication Explicit WebAuthn app integration and WebView feature support. This does not establish relying-party/domain association or enrollment.
* @property {boolean} nativePasswordSelection Explicit Android 14+ framework password chooser; separate from Autofill and passkeys.
* @property {boolean} nativeNotificationPresentation Channel/group/public-version submission with shared response receipts.
* @property {boolean} systemTextScaling Android interactive WebViews apply absolute system text zoom before navigation and on configuration changes; webview.text_zoom can select fixed or manual ownership. Linear WebView zoom is not Android nonlinear native text scaling.
* @property {boolean} nativeStartupPresentation Android can reveal a verified bundled startup screen through the current window's markPresented() without acknowledging readiness or stopping native recovery deadlines.
* @property {boolean} systemGestureExclusion Bounded document-owned edge requests; Android retains mandatory navigation policy.
* @property {boolean} nativeExtensions Configured compiled native extension lifecycle and document-owned operations.
* @property {boolean} pointerCapture
* @property {boolean} historicalProcessExits
*/
/**
* Reports implemented Android native contracts and explicit unavailable features.
* A supported contract still needs permission, active ownership, and application
* authorization. Other platforms reject with ENOSYS.
* @returns {Promise<RuntimeCapabilities>}
*/
export function getCapabilities(): Promise<RuntimeCapabilities>;
/**
* Reads Android build identity without URLs, account data, input values, or logs.
* Other platforms reject with `ENOSYS`. This is not proof of release signing.
* @returns {Promise<AndroidBuildIdentity>}
*/
export function getBuildIdentity(): Promise<AndroidBuildIdentity>;
/**
* Queries runtime diagnostics.
* @return {Promise<QueryDiagnostic>}
*/
export function query(type: any): Promise<QueryDiagnostic>;
/**
* A base container class for diagnostic information.
*/
export class Diagnostic {
/**
* A container for handles related to the diagnostics
*/
static Handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
/**
* Known handles for this diagnostics.
* @type {Diagnostic.Handles}
*/
handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
}
/**
* A container for libuv diagnostics
*/
export class UVDiagnostic extends Diagnostic {
/**
* A container for libuv metrics.
*/
static Metrics: {
new (): {
/**
* The number of event loop iterations.
* @type {number}
*/
loopCount: number;
/**
* Number of events that have been processed by the event handler.
* @type {number}
*/
events: number;
/**
* Number of events that were waiting to be processed when the
* event provider was called.
* @type {number}
*/
eventsWaiting: number;
};
};
/**
* Known libuv metrics for this diagnostic.
* @type {UVDiagnostic.Metrics}
*/
metrics: {
new (): {
/**
* The number of event loop iterations.
* @type {number}
*/
loopCount: number;
/**
* Number of events that have been processed by the event handler.
* @type {number}
*/
events: number;
/**
* Number of events that were waiting to be processed when the
* event provider was called.
* @type {number}
*/
eventsWaiting: number;
};
};
/**
* The current idle time of the libuv loop
* @type {number}
*/
idleTime: number;
/**
* The number of active requests in the libuv loop
* @type {number}
*/
activeRequests: number;
}
/**
* A container for Core Post diagnostics.
*/
export class PostsDiagnostic extends Diagnostic {
}
/**
* A container for child process diagnostics.
*/
export class ChildProcessDiagnostic extends Diagnostic {
}
/**
* A container for AI diagnostics.
*/
export class AIDiagnostic extends Diagnostic {
/**
* A container for AI LLM diagnostics.
*/
static LLMDiagnostic: {
new (): {
/**
* Known handles for this diagnostics.
* @type {Diagnostic.Handles}
*/
handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* A container for handles related to the diagnostics
*/
Handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* Known AI LLM diagnostics.
* @type {AIDiagnostic.LLMDiagnostic}
*/
llm: {
new (): {
/**
* Known handles for this diagnostics.
* @type {Diagnostic.Handles}
*/
handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* A container for handles related to the diagnostics
*/
Handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
}
/**
* A container for various filesystem diagnostics.
*/
export class FSDiagnostic extends Diagnostic {
/**
* A container for filesystem watcher diagnostics.
*/
static WatchersDiagnostic: {
new (): {
/**
* Known handles for this diagnostics.
* @type {Diagnostic.Handles}
*/
handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* A container for handles related to the diagnostics
*/
Handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* A container for filesystem descriptors diagnostics.
*/
static DescriptorsDiagnostic: {
new (): {
/**
* Known handles for this diagnostics.
* @type {Diagnostic.Handles}
*/
handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* A container for handles related to the diagnostics
*/
Handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* Known FS watcher diagnostics.
* @type {FSDiagnostic.WatchersDiagnostic}
*/
watchers: {
new (): {
/**
* Known handles for this diagnostics.
* @type {Diagnostic.Handles}
*/
handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* A container for handles related to the diagnostics
*/
Handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* @type {FSDiagnostic.DescriptorsDiagnostic}
*/
descriptors: {
new (): {
/**
* Known handles for this diagnostics.
* @type {Diagnostic.Handles}
*/
handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* A container for handles related to the diagnostics
*/
Handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
}
/**
* A container for various timers diagnostics.
*/
export class TimersDiagnostic extends Diagnostic {
/**
* A container for core timeout timer diagnostics.
*/
static TimeoutDiagnostic: {
new (): {
/**
* Known handles for this diagnostics.
* @type {Diagnostic.Handles}
*/
handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* A container for handles related to the diagnostics
*/
Handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* A container for core interval timer diagnostics.
*/
static IntervalDiagnostic: {
new (): {
/**
* Known handles for this diagnostics.
* @type {Diagnostic.Handles}
*/
handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* A container for handles related to the diagnostics
*/
Handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* A container for core immediate timer diagnostics.
*/
static ImmediateDiagnostic: {
new (): {
/**
* Known handles for this diagnostics.
* @type {Diagnostic.Handles}
*/
handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* A container for handles related to the diagnostics
*/
Handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* @type {TimersDiagnostic.TimeoutDiagnostic}
*/
timeout: {
new (): {
/**
* Known handles for this diagnostics.
* @type {Diagnostic.Handles}
*/
handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* A container for handles related to the diagnostics
*/
Handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* @type {TimersDiagnostic.IntervalDiagnostic}
*/
interval: {
new (): {
/**
* Known handles for this diagnostics.
* @type {Diagnostic.Handles}
*/
handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* A container for handles related to the diagnostics
*/
Handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* @type {TimersDiagnostic.ImmediateDiagnostic}
*/
immediate: {
new (): {
/**
* Known handles for this diagnostics.
* @type {Diagnostic.Handles}
*/
handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
/**
* A container for handles related to the diagnostics
*/
Handles: {
new (): {
/**
* The nunmber of handles in this diagnostics.
* @type {number}
*/
count: number;
/**
* A set of known handle IDs
* @type {string[]}
*/
ids: string[];
};
};
};
}
/**
* A container for UDP diagnostics.
*/
export class UDPDiagnostic extends Diagnostic {
}
/**
* A container for various queried runtime diagnostics.
*/
export class QueryDiagnostic {
posts: PostsDiagnostic;
childProcess: ChildProcessDiagnostic;
ai: AIDiagnostic;
fs: FSDiagnostic;
timers: TimersDiagnostic;
udp: UDPDiagnostic;
uv: UVDiagnostic;
}
namespace _default {
export { getCapabilities };
export { getBuildIdentity };
export { query };
}
export default _default;
export type AndroidStartupTiming = {
/**
* Fixed native startup phase.
*/
phase: "native-library" | "native-allocation" | "native-extensions" | "process-lifecycle";
/**
* Monotonic duration; excludes process launch and renderer startup.
*/
durationMs: number;
};
export type AndroidLifecycleEvent = {
/**
* Runtime window index.
*/
index: number;
phase: "loading" | "presented" | "ready" | "failed" | "renderer-lost" | "reload";
/**
* Monotonic time since the first retained process event.
*/
elapsedMs: number;
/**
* Startup elapsed time for presentation/readiness/failure; zero otherwise.
*/
durationMs: number;
};
export type AndroidBuildIdentity = {
/**
* Version compiled into the native runtime.
*/
nativeVersion: string;
/**
* Source revision compiled into the native runtime.
*/
nativeRevision: string;
/**
* CLI that generated this application's init shim.
*/
cliVersion: string;
/**
* SHA-256 of asset and build evidence bound into the native init shim; not the APK digest.
*/
assetManifestSha256: string;
/**
* Staged Android native files, normalized settings, SDK inventory and toolchain input fingerprint; null for older or unbound evidence. APK digest and signing certificate identify the exact compiled artifact.
*/
applicationInputSha256: string | null;
/**
* Native bridge version.
*/
androidBridgeProtocol: number;
/**
* Android compiled callback adapter version; 1 for the native C++ facade.
*/
nativeCallbacksProtocol?: number;
/**
* Native C++ encrypted record format; distinct from Kotlin v1 storage and migration.
*/
nativeRecordsProtocol?: number;
/**
* Native installation-scoped unreadable push-journal quarantine protocol.
*/
nativePushJournalRecoveryProtocol?: number;
/**
* Owned native service, v1 interoperability and child-execution SDK protocol.
*/
nativeServicesProtocol?: number;
/**
* Packaged declarative read-and-notify executor protocol.
*/
nativeWorkflowsProtocol?: number;
/**
* Compiled architecture.
*/
abi: string;
debug: boolean;
/**
* Device SDK.
*/
sdk: number;
/**
* Application target SDK.
*/
targetSdk: number;
/**
* Installed WebView package version.
*/
webViewVersion: string | null;
/**
* Whether native startup verified all packaged assets.
*/
assetsVerified: boolean;
/**
* Redacted, OS-retained exit summaries.
*/
processExits: AndroidProcessExits;
/**
* At most 64 process-local timings; no URLs or application payloads.
*/
lifecycleEvents: AndroidLifecycleEvent[];
/**
* At most four native startup phases; no application payloads.
*/
startupTimings: AndroidStartupTiming[];
};
export type AndroidProcessExit = {
/**
* False; OS history may predate the running artifact.
*/
buildIdentityKnown: boolean;
/**
* Android ApplicationExitInfo reason code.
*/
reason: number;
/**
* Exit status code.
*/
status: number;
/**
* Unix milliseconds.
*/
timestamp: number;
/**
* Android process importance.
*/
importance: number;
/**
* Last recorded proportional memory size.
*/
pssKiB: number;
/**
* Last recorded resident memory size.
*/
rssKiB: number;
};
export type AndroidProcessExits = {
/**
* API 30+ system query succeeded.
*/
available: boolean;
/**
* At most 16 summaries; no descriptions, traces, or process names.
*/
entries: AndroidProcessExit[];
};
export type RuntimeCapabilities = {
/**
* Requires Android 11+ and a live foreground window.
*/
nativeFullscreen: boolean;
fullscreenRequiresManagedInsets: boolean;
/**
* Android FLAG_SECURE, not control of exported content.
*/
screenProtection: boolean;
documentMetadata: boolean;
/**
* Existing user-selected tree grants only.
*/
documentTreeQueries: boolean;
documentQueryWorkers: number;
documentQueryDeadlineMs: number;
/**
* Explicitly enabled native share-prune scheduling.
*/
nativeBackgroundCleanup: boolean;
/**
* False; arbitrary durable JS execution is unavailable.
*/
backgroundJavaScript: boolean;
/**
* Configured optional UnifiedPush transport. Query oro:push for selection and registered handlers; this does not prove server enrollment or delivery.
*/
push: boolean;
/**
* Document-owned Back handler with native fallback.
*/
applicationBackHandling: boolean;
/**
* Configured periodic native read scheduling.
*/
periodicDeferredReads: boolean;
/**
* Registered retry-safe cleanup/revocation scheduling; general queued writes remain unavailable.
*/
nativeDeferredMaintenance: boolean;
/**
* Configured user-started dataSync executor service; query oro:foreground for current admission and registered executors.
*/
nativeForegroundExecution: boolean;
/**
* Configured user-started specialUse monitoring; query oro:foreground/continuous for current admission.
*/
nativeContinuousExecution: boolean;
/**
* Native-only encrypted identity-bound CAS records and migration; not exposed through JavaScript.
*/
nativeTransactionalRecords: boolean;
/**
* Native-only conditional intents, records and uncertain-outcome coordination; external authorization remains application-owned.
*/
nativeCoordination: boolean;
biometricSecretUnlock: boolean;
namedLauncherDestinations: boolean;
/**
* Configured native read/reconciliation scheduler; query registered executors separately.
*/
nativeDeferredReads: boolean;
/**
* False; queued mutation replay is not supported.
*/
deferredWrites: boolean;
/**
* Explicit WebAuthn app integration and WebView feature support. This does not establish relying-party/domain association or enrollment.
*/
webAuthentication: boolean;
/**
* Explicit Android 14+ framework password chooser; separate from Autofill and passkeys.
*/
nativePasswordSelection: boolean;
/**
* Channel/group/public-version submission with shared response receipts.
*/
nativeNotificationPresentation: boolean;
/**
* Android interactive WebViews apply absolute system text zoom before navigation and on configuration changes; webview.text_zoom can select fixed or manual ownership. Linear WebView zoom is not Android nonlinear native text scaling.
*/
systemTextScaling: boolean;
/**
* Android can reveal a verified bundled startup screen through the current window's markPresented() without acknowledging readiness or stopping native recovery deadlines.
*/
nativeStartupPresentation: boolean;
/**
* Bounded document-owned edge requests; Android retains mandatory navigation policy.
*/
systemGestureExclusion: boolean;
/**
* Configured compiled native extension lifecycle and document-owned operations.
*/
nativeExtensions: boolean;
pointerCapture: boolean;
historicalProcessExits: boolean;
};
}
oro:diagnostics/window#
declare module "oro:diagnostics/window" {
/**
* @typedef {object} RequestAnimationFrameMetricOptions
* @property {number} [sampleSize=60] Rolling sample capacity, from 1 to 3600.
*/
/** Measures distinct animation frame timestamps using a bounded rolling buffer. */
export class RequestAnimationFrameMetric extends Metric {
/** @param {RequestAnimationFrameMetricOptions} [options] */
constructor(options?: RequestAnimationFrameMetricOptions);
originalRequestAnimationFrame: typeof requestAnimationFrame;
requestAnimationFrame(callback: any): any;
sampleSize: number;
sampleTick: number;
channel: import("oro:diagnostics/channels").Channel;
value: {
rate: number;
samples: number;
};
now: number;
samples: Float64Array<ArrayBuffer>;
/** @param {number} timestamp Animation frame timestamp in milliseconds. */
update(timestamp: number): void;
toJSON(): {
sampleSize: number;
sampleTick: number;
samples: number[];
rate: number;
now: number;
};
#private;
}
export class FetchMetric extends Metric {
constructor(_options: any);
originalFetch: typeof fetch;
channel: import("oro:diagnostics/channels").Channel;
fetch(resource: any, options: any, extra: any): Promise<any>;
}
export class XMLHttpRequestMetric extends Metric {
constructor(_options: any);
channel: import("oro:diagnostics/channels").Channel;
patched: {
open: {
(method: string, url: string | URL): void;
(method: string, url: string | URL, async: boolean, username?: string | null, password?: string | null): void;
};
send: (body?: Document | XMLHttpRequestBodyInit | null) => void;
};
}
export class WorkerMetric extends Metric {
constructor(_options: any);
GlobalWorker: {
new (scriptURL: string | URL, options?: WorkerOptions): Worker;
prototype: Worker;
} | {
new (): {};
};
channel: import("oro:diagnostics/channels").Channel;
Worker: {
new (url: any, options: any, ...args: any[]): {};
};
}
export const metrics: {
requestAnimationFrame: RequestAnimationFrameMetric;
XMLHttpRequest: XMLHttpRequestMetric;
Worker: WorkerMetric;
fetch: FetchMetric;
channel: import("oro:diagnostics/channels").ChannelGroup;
subscribe(...args: any[]): boolean;
unsubscribe(...args: any[]): boolean;
start(which: any): void;
stop(which: any): void;
};
namespace _default {
export { metrics };
}
export default _default;
export type RequestAnimationFrameMetricOptions = {
/**
* Rolling sample capacity, from 1 to 3600.
*/
sampleSize?: number;
};
import { Metric } from "oro:diagnostics/metric";
}
See also#
Source repository · Edit this page · View Markdown