@quiesco/protocol 0.8.0 → 0.9.0
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/dist/config.d.ts +8 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -0
- package/dist/constants.js.map +1 -1
- package/dist/events.d.ts +8 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +8 -1
- package/dist/events.js.map +1 -1
- package/package.json +1 -1
- package/src/config.ts +8 -2
- package/src/constants.ts +2 -0
- package/src/events.ts +9 -0
package/dist/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LogLevel } from './events.js';
|
|
2
2
|
import type { Matcher, TextMatch } from './matcher.js';
|
|
3
|
-
export declare const TRACKER_NAMES: readonly ["network", "timer", "react", "idle-callback", "frame-stable", "native"];
|
|
3
|
+
export declare const TRACKER_NAMES: readonly ["network", "timer", "react", "idle-callback", "frame-stable", "native", "native-module"];
|
|
4
4
|
export type TrackerName = (typeof TRACKER_NAMES)[number];
|
|
5
5
|
/**
|
|
6
6
|
* Agent-side settings derived from `quiesco.config.ts` (requirements.md §6.2, §6.13).
|
|
@@ -14,8 +14,14 @@ export interface AgentConfig {
|
|
|
14
14
|
stableFrames: number;
|
|
15
15
|
/** URL patterns ignored by the network tracker. Strings match as substrings. */
|
|
16
16
|
ignoreUrls: TextMatch[];
|
|
17
|
-
/** Per-tracker switch; omitted trackers are enabled. */
|
|
17
|
+
/** Per-tracker switch; omitted trackers are enabled, except `native-module` (off unless `true`). */
|
|
18
18
|
trackers: Partial<Record<TrackerName, boolean>>;
|
|
19
|
+
/**
|
|
20
|
+
* `native-module` tracker (issue #67): how long a pending native module call counts as busy, and the
|
|
21
|
+
* calls ("Module.method") that never count. Optional for older hosts.
|
|
22
|
+
*/
|
|
23
|
+
nativeCallThresholdMs?: number;
|
|
24
|
+
ignoreNativeCalls?: TextMatch[];
|
|
19
25
|
/**
|
|
20
26
|
* Elements (and their subtrees) left out of the frame-stable check, e.g. a decorative animation that
|
|
21
27
|
* runs for minutes. Optional for older hosts.
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEvD,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEvD,eAAO,MAAM,aAAa,oGAAqG,CAAC;AAChI,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM,CAAC;QAClB,gBAAgB,EAAE,MAAM,CAAC;QACzB,cAAc,EAAE,OAAO,CAAC;QACxB,YAAY,EAAE,MAAM,CAAC;QACrB,gFAAgF;QAChF,UAAU,EAAE,SAAS,EAAE,CAAC;QACxB,oGAAoG;QACpG,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;QAChD;;;WAGG;QACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;QAC/B,iBAAiB,CAAC,EAAE,SAAS,EAAE,CAAC;QAChC;;;WAGG;QACH,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC;KAC5B,CAAC;IACF,kFAAkF;IAClF,QAAQ,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB;;;;OAIG;IACH,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IAC/B;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAErD,MAAM,WAAW,WAAW;IAC1B,sFAAsF;IACtF,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
package/dist/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const TRACKER_NAMES = ['network', 'timer', 'react', 'idle-callback', 'frame-stable', 'native'];
|
|
1
|
+
export const TRACKER_NAMES = ['network', 'timer', 'react', 'idle-callback', 'frame-stable', 'native', 'native-module'];
|
|
2
2
|
//# sourceMappingURL=config.js.map
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,CAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,CAAU,CAAC"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -37,6 +37,8 @@ export declare const SyncDefaults: {
|
|
|
37
37
|
readonly timerThresholdMs: 1500;
|
|
38
38
|
readonly stableFrames: 2;
|
|
39
39
|
readonly countIntervals: false;
|
|
40
|
+
/** `native-module` tracker: a pending native module call counts as busy for at most this long. */
|
|
41
|
+
readonly nativeCallThresholdMs: 2000;
|
|
40
42
|
/** Interval between re-checks while an assertion fails or an action target is not ready yet. */
|
|
41
43
|
readonly retryIntervalMs: 50;
|
|
42
44
|
};
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAC1G,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAC/C,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AACrD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAC/C,gGAAgG;AAChG,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAE/C,kFAAkF;AAClF,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC,mFAAmF;AACnF,eAAO,MAAM,SAAS;IACpB,mCAAmC;;IAEnC,iFAAiF;;IAEjF,qCAAqC;;IAErC,6FAA6F;;CAErF,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAEnE,kDAAkD;AAClD,eAAO,MAAM,YAAY;;;;;IAKvB,gGAAgG;;CAExF,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAC1G,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAC/C,eAAO,MAAM,oBAAoB,mBAAmB,CAAC;AACrD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAC/C,gGAAgG;AAChG,eAAO,MAAM,gBAAgB,eAAe,CAAC;AAC7C,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAE/C,kFAAkF;AAClF,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC,mFAAmF;AACnF,eAAO,MAAM,SAAS;IACpB,mCAAmC;;IAEnC,iFAAiF;;IAEjF,qCAAqC;;IAErC,6FAA6F;;CAErF,CAAC;AACX,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAEnE,kDAAkD;AAClD,eAAO,MAAM,YAAY;;;;;IAKvB,kGAAkG;;IAElG,gGAAgG;;CAExF,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -36,6 +36,8 @@ export const SyncDefaults = {
|
|
|
36
36
|
timerThresholdMs: 1_500,
|
|
37
37
|
stableFrames: 2,
|
|
38
38
|
countIntervals: false,
|
|
39
|
+
/** `native-module` tracker: a pending native module call counts as busy for at most this long. */
|
|
40
|
+
nativeCallThresholdMs: 2_000,
|
|
39
41
|
/** Interval between re-checks while an assertion fails or an action target is not ready yet. */
|
|
40
42
|
retryIntervalMs: 50,
|
|
41
43
|
};
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,0GAA0G;AAC1G,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAElC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAC/C,MAAM,CAAC,MAAM,oBAAoB,GAAG,gBAAgB,CAAC;AACrD;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAC/C,gGAAgG;AAChG,MAAM,CAAC,MAAM,gBAAgB,GAAG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vB,6FAA6F;IAC7F,QAAQ,EAAE,IAAI;CACN,CAAC;AAGX,kDAAkD;AAClD,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,SAAS,EAAE,MAAM;IACjB,gBAAgB,EAAE,KAAK;IACvB,YAAY,EAAE,CAAC;IACf,cAAc,EAAE,KAAK;IACrB,kGAAkG;IAClG,qBAAqB,EAAE,KAAK;IAC5B,gGAAgG;IAChG,eAAe,EAAE,EAAE;CACX,CAAC"}
|
package/dist/events.d.ts
CHANGED
|
@@ -16,4 +16,12 @@ export interface AgentEvents {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
export type AgentEventName = keyof AgentEvents;
|
|
19
|
+
/**
|
|
20
|
+
* Notification the host sends while a call to the agent is pending, every HOST_TICK_MS (issue #66). It
|
|
21
|
+
* carries nothing: any incoming message makes the agent check a pending wait for idle again. On Android
|
|
22
|
+
* React Native pauses JS timers while the app is in the background (a system dialog is up), so a wait
|
|
23
|
+
* sleeping on a timer would neither end nor time out. Agents that do not know it ignore it.
|
|
24
|
+
*/
|
|
25
|
+
export declare const HOST_TICK = "tick";
|
|
26
|
+
export declare const HOST_TICK_MS = 500;
|
|
19
27
|
//# sourceMappingURL=events.d.ts.map
|
package/dist/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D,MAAM,WAAW,WAAW;IAC1B,6EAA6E;IAC7E,GAAG,EAAE;QAAE,KAAK,EAAE,QAAQ,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7D,kGAAkG;IAClG,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,GAAG,oBAAoB,GAAG,QAAQ,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;CACnH;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D,MAAM,WAAW,WAAW;IAC1B,6EAA6E;IAC7E,GAAG,EAAE;QAAE,KAAK,EAAE,QAAQ,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7D,kGAAkG;IAClG,KAAK,EAAE;QAAE,IAAI,EAAE,UAAU,GAAG,oBAAoB,GAAG,QAAQ,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;CACnH;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,WAAW,CAAC;AAE/C;;;;;GAKG;AACH,eAAO,MAAM,SAAS,SAAS,CAAC;AAChC,eAAO,MAAM,YAAY,MAAM,CAAC"}
|
package/dist/events.js
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Notification the host sends while a call to the agent is pending, every HOST_TICK_MS (issue #66). It
|
|
3
|
+
* carries nothing: any incoming message makes the agent check a pending wait for idle again. On Android
|
|
4
|
+
* React Native pauses JS timers while the app is in the background (a system dialog is up), so a wait
|
|
5
|
+
* sleeping on a timer would neither end nor time out. Agents that do not know it ignore it.
|
|
6
|
+
*/
|
|
7
|
+
export const HOST_TICK = 'tick';
|
|
8
|
+
export const HOST_TICK_MS = 500;
|
|
2
9
|
//# sourceMappingURL=events.js.map
|
package/dist/events.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAYA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC;AAChC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,CAAC"}
|
package/package.json
CHANGED
package/src/config.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LogLevel } from './events.js';
|
|
2
2
|
import type { Matcher, TextMatch } from './matcher.js';
|
|
3
3
|
|
|
4
|
-
export const TRACKER_NAMES = ['network', 'timer', 'react', 'idle-callback', 'frame-stable', 'native'] as const;
|
|
4
|
+
export const TRACKER_NAMES = ['network', 'timer', 'react', 'idle-callback', 'frame-stable', 'native', 'native-module'] as const;
|
|
5
5
|
export type TrackerName = (typeof TRACKER_NAMES)[number];
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -16,8 +16,14 @@ export interface AgentConfig {
|
|
|
16
16
|
stableFrames: number;
|
|
17
17
|
/** URL patterns ignored by the network tracker. Strings match as substrings. */
|
|
18
18
|
ignoreUrls: TextMatch[];
|
|
19
|
-
/** Per-tracker switch; omitted trackers are enabled. */
|
|
19
|
+
/** Per-tracker switch; omitted trackers are enabled, except `native-module` (off unless `true`). */
|
|
20
20
|
trackers: Partial<Record<TrackerName, boolean>>;
|
|
21
|
+
/**
|
|
22
|
+
* `native-module` tracker (issue #67): how long a pending native module call counts as busy, and the
|
|
23
|
+
* calls ("Module.method") that never count. Optional for older hosts.
|
|
24
|
+
*/
|
|
25
|
+
nativeCallThresholdMs?: number;
|
|
26
|
+
ignoreNativeCalls?: TextMatch[];
|
|
21
27
|
/**
|
|
22
28
|
* Elements (and their subtrees) left out of the frame-stable check, e.g. a decorative animation that
|
|
23
29
|
* runs for minutes. Optional for older hosts.
|
package/src/constants.ts
CHANGED
|
@@ -41,6 +41,8 @@ export const SyncDefaults = {
|
|
|
41
41
|
timerThresholdMs: 1_500,
|
|
42
42
|
stableFrames: 2,
|
|
43
43
|
countIntervals: false,
|
|
44
|
+
/** `native-module` tracker: a pending native module call counts as busy for at most this long. */
|
|
45
|
+
nativeCallThresholdMs: 2_000,
|
|
44
46
|
/** Interval between re-checks while an assertion fails or an action target is not ready yet. */
|
|
45
47
|
retryIntervalMs: 50,
|
|
46
48
|
} as const;
|
package/src/events.ts
CHANGED
|
@@ -9,3 +9,12 @@ export interface AgentEvents {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export type AgentEventName = keyof AgentEvents;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Notification the host sends while a call to the agent is pending, every HOST_TICK_MS (issue #66). It
|
|
15
|
+
* carries nothing: any incoming message makes the agent check a pending wait for idle again. On Android
|
|
16
|
+
* React Native pauses JS timers while the app is in the background (a system dialog is up), so a wait
|
|
17
|
+
* sleeping on a timer would neither end nor time out. Agents that do not know it ignore it.
|
|
18
|
+
*/
|
|
19
|
+
export const HOST_TICK = 'tick';
|
|
20
|
+
export const HOST_TICK_MS = 500;
|