@ohos-perf/core 0.22.4 → 0.24.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +557 -35
  2. package/dist/index.js +1045 -225
  3. package/package.json +48 -48
package/dist/index.d.ts CHANGED
@@ -2584,7 +2584,7 @@ declare function loadCases(cases: readonly DiscoveredCase[]): CaseLoad[];
2584
2584
 
2585
2585
  /**
2586
2586
  * The HapRay parity ledger: one row per capability in the source-level
2587
- * inventory of ArkAnalyzer-HapRay rev `9386e4e`.
2587
+ * inventory of ArkAnalyzer-HapRay rev `bd5c98a` (2026-11-18).
2588
2588
  *
2589
2589
  * This exists because the claim drifted. The README said "18 ported / 9
2590
2590
  * partial / 8 missing" long after six releases had moved rows, and nothing
@@ -2595,6 +2595,12 @@ declare function loadCases(cases: readonly DiscoveredCase[]): CaseLoad[];
2595
2595
  * The numbering is the inventory's own (`gap-analysis.md`), and it is what
2596
2596
  * the README and the site quote. Each `reason` for a non-ported row names what
2597
2597
  * is absent, so "not worth it" and "not done" are distinguishable.
2598
+ *
2599
+ * **Re-pinned from `9386e4e` to `bd5c98a`** in 0.23.0. The 428 commits between
2600
+ * them added three actions (`build`, `root-cause`, and an LLM exploration
2601
+ * strategy inside `haptest`) and a thermal collector. Rows 1–35 keep their
2602
+ * numbers; the new capabilities are appended so a reader can tell the original
2603
+ * inventory from what followed it.
2598
2604
  */
2599
2605
  /** How much of one HapRay capability this package implements. */
2600
2606
  type ParityStatus = 'ported' | 'partial' | 'missing' | 'out';
@@ -4588,12 +4594,18 @@ declare function executeAction(device: ActionDevice, app: string, action: Scenar
4588
4594
 
4589
4595
  /** The three orders HapRay offers, kept under their names. */
4590
4596
  type ExplorationStrategy = 'depth_first' | 'breadth_first' | 'random';
4597
+ /** Which way a scroll gesture's content moves. */
4598
+ type ScrollDirection = 'up' | 'down';
4591
4599
  /** What exploration needs from a device. `Device` satisfies it structurally. */
4592
4600
  interface ExplorationDevice {
4593
4601
  /** The flattened on-screen tree, as `flattenUiTree` returns it. */
4594
4602
  dump(): Promise<readonly UiNode[]>;
4595
4603
  /** Tap the centre of `bounds`. Throws when the device refuses the gesture. */
4596
4604
  tap(bounds: string): Promise<void>;
4605
+ /** Swipe inside a scrollable node. Absent when the device cannot scroll. */
4606
+ swipe?(bounds: string, direction: ScrollDirection): Promise<void>;
4607
+ /** Press the system back button. Absent when the device cannot go back. */
4608
+ back?(): Promise<void>;
4597
4609
  }
4598
4610
  interface ExplorationState {
4599
4611
  readonly tree: readonly UiNode[];
@@ -4602,6 +4614,12 @@ interface ExplorationState {
4602
4614
  readonly strategy: ExplorationStrategy;
4603
4615
  /** Required by `random`; ignored by the ordered strategies. */
4604
4616
  readonly seed?: number;
4617
+ /**
4618
+ * The bundle the walk must stay inside. Nodes from another bundle are not
4619
+ * offered and not tapped; a screen with none of this app's nodes means the
4620
+ * walk has left the app.
4621
+ */
4622
+ readonly app?: string;
4605
4623
  }
4606
4624
  /** The next tap, or `undefined` when this screen has nothing left to offer. */
4607
4625
  interface ExplorationAction {
@@ -4609,18 +4627,33 @@ interface ExplorationAction {
4609
4627
  readonly nodeId: string;
4610
4628
  readonly bounds: string;
4611
4629
  }
4612
- /** Whether a tap moved the screen. */
4613
- type ExplorationOutcome = 'navigated' | 'no_change';
4614
- /** One tap, with the state hash either side of it. */
4630
+ /**
4631
+ * What a step did.
4632
+ *
4633
+ * `navigated` reached a different page, `updated` changed the screen without
4634
+ * changing the page (new data on the same template, a scroll), and `no_change`
4635
+ * left the screen exactly as it was.
4636
+ */
4637
+ type ExplorationOutcome = 'navigated' | 'updated' | 'no_change';
4638
+ /** What a step performed. */
4639
+ type ExplorationStepKind = 'tap' | 'scroll' | 'back';
4640
+ /** One step, with the state hash either side of it. */
4615
4641
  interface ExplorationStep {
4616
4642
  readonly index: number;
4617
- readonly nodeId: string;
4618
- readonly bounds: string;
4619
- /** The screen hash before the tap. */
4643
+ readonly kind: ExplorationStepKind;
4644
+ /** Present for a tap: the identity of the node that was tapped. */
4645
+ readonly nodeId?: string;
4646
+ /** Present for a tap or a scroll: the bounds the gesture was aimed at. */
4647
+ readonly bounds?: string;
4648
+ /** The screen hash before the step. */
4620
4649
  readonly before: string;
4621
4650
  /** The screen hash after it; equal to `before` means `no_change`. */
4622
4651
  readonly after: string;
4623
4652
  readonly outcome: ExplorationOutcome;
4653
+ /** Who picked this step: the deterministic order, or a supplied chooser. */
4654
+ readonly decidedBy: 'strategy' | 'model';
4655
+ /** The chooser's one-line reason, for a step it decided. */
4656
+ readonly reason?: string;
4624
4657
  }
4625
4658
  interface ExplorationResult {
4626
4659
  readonly strategy: ExplorationStrategy;
@@ -4629,18 +4662,106 @@ interface ExplorationResult {
4629
4662
  readonly steps: readonly ExplorationStep[];
4630
4663
  /** Distinct screen hashes reached, including the one it started on. */
4631
4664
  readonly statesReached: number;
4632
- /** True when it stopped because this screen had no unvisited clickable. */
4665
+ /** Distinct page templates reached, including the one it started on. */
4666
+ readonly pagesReached: number;
4667
+ /** The page hashes in first-reach order, the way a reader follows the walk. */
4668
+ readonly pages: readonly string[];
4669
+ /** How many scroll steps were spent. */
4670
+ readonly scrolls: number;
4671
+ /** How many back steps were spent. */
4672
+ readonly backs: number;
4673
+ /**
4674
+ * Why the walk ended: the step cap, nothing left to try, the model asked to
4675
+ * stop, or the walk left the target app and could not return.
4676
+ */
4677
+ readonly stoppedBy: 'budget' | 'exhausted' | 'model' | 'left_app';
4678
+ /** True when it stopped because nothing was left to tap, scroll or return to. */
4633
4679
  readonly exhausted: boolean;
4680
+ /**
4681
+ * What a supplied chooser proposed, when one was supplied: how many proposals
4682
+ * the walk used, and every answer it refused with the reason. A refusal is
4683
+ * evidence, not an error — the deterministic order decides instead.
4684
+ */
4685
+ readonly proposals?: {
4686
+ readonly used: number;
4687
+ readonly refused: number;
4688
+ readonly refusals: readonly {
4689
+ readonly step: number;
4690
+ readonly detail: string;
4691
+ }[];
4692
+ };
4634
4693
  }
4694
+ /** One element a chooser may name, as the walk saw it. */
4695
+ interface ExplorationCandidate {
4696
+ /** The identity the walk records for this element; the answer must match it. */
4697
+ readonly identity: string;
4698
+ readonly type: string;
4699
+ readonly text: string;
4700
+ readonly bounds: string;
4701
+ readonly depth: number;
4702
+ }
4703
+ /** Everything a chooser is shown about the moment it decides. */
4704
+ interface ExplorationChoiceContext {
4705
+ /** The bundle the walk must stay inside, when one was named. */
4706
+ readonly app?: string;
4707
+ /** Zero-based index of the step being decided. */
4708
+ readonly step: number;
4709
+ readonly maxSteps: number;
4710
+ /** The exact tree the offer was computed from. */
4711
+ readonly screen: readonly UiNode[];
4712
+ /** The elements the chooser may choose, in document order. */
4713
+ readonly candidates: readonly ExplorationCandidate[];
4714
+ /** The steps already taken, oldest first. */
4715
+ readonly history: readonly ExplorationStep[];
4716
+ /** Whether this step could scroll. */
4717
+ readonly canScroll: boolean;
4718
+ /** Whether this step could go back. */
4719
+ readonly canBack: boolean;
4720
+ }
4721
+ /** What a chooser answers: one action, or a refusal it could not parse a choice from. */
4722
+ type ExplorationProposal = {
4723
+ readonly kind: 'tap';
4724
+ readonly identity: string;
4725
+ readonly reason: string;
4726
+ } | {
4727
+ readonly kind: 'scroll';
4728
+ readonly direction: ScrollDirection;
4729
+ readonly reason: string;
4730
+ } | {
4731
+ readonly kind: 'back';
4732
+ readonly reason: string;
4733
+ } | {
4734
+ readonly kind: 'stop';
4735
+ readonly reason: string;
4736
+ } | {
4737
+ readonly kind: 'refusal';
4738
+ readonly detail: string;
4739
+ };
4740
+ /**
4741
+ * An optional decision-maker consulted at each step that has an element to
4742
+ * choose. Its answer is verified against the offer before it decides anything;
4743
+ * a name that was not offered is recorded as a refusal.
4744
+ */
4745
+ type ExplorationChooser = (context: ExplorationChoiceContext) => Promise<ExplorationProposal>;
4635
4746
  interface ExplorationOptions {
4636
- /** Hard cap on taps. HapRay's default is 30. */
4747
+ /** Hard cap on steps. HapRay's default is 30. */
4637
4748
  readonly maxSteps: number;
4638
4749
  readonly strategy: ExplorationStrategy;
4639
4750
  /** Makes `random` reproducible. Defaults to 0, never to the clock. */
4640
4751
  readonly seed?: number;
4752
+ /** The bundle the walk must stay inside. */
4753
+ readonly app?: string;
4754
+ /**
4755
+ * A model (or anything else) that may choose each step. Absent means the
4756
+ * deterministic order decides every step. With a chooser, irreversible
4757
+ * targets are not offered at all.
4758
+ */
4759
+ readonly choose?: ExplorationChooser;
4641
4760
  }
4642
4761
  /** A short hex digest of a screen, stable across runs and hosts. */
4643
4762
  declare function hashTree(tree: readonly UiNode[]): string;
4763
+ /** A short digest of a page's structure: two trees with the same shape share it. */
4764
+ declare function hashPageShape(tree: readonly UiNode[]): string;
4644
4765
  /**
4645
4766
  * The next tap on one screen.
4646
4767
  *
@@ -4649,13 +4770,21 @@ declare function hashTree(tree: readonly UiNode[]): string;
4649
4770
  */
4650
4771
  declare function planNextAction(state: ExplorationState): ExplorationAction | undefined;
4651
4772
  /**
4652
- * Walk the app until the step budget runs out or the screen is exhausted.
4773
+ * Walk the app until the step budget runs out or nothing is left to try.
4653
4774
  *
4654
- * `statesReached` counts distinct hashes rather than taps, so a walk that
4775
+ * `statesReached` counts distinct hashes rather than steps, so a walk that
4655
4776
  * bounced between two screens reports two states however many steps it spent.
4656
- * The returned steps carry the hash either side of each tap: a saved run can be
4657
- * re-read without the device, and two runs that disagree can be compared by
4777
+ * The returned steps carry the hash either side of each action: a saved run can
4778
+ * be re-read without the device, and two runs that disagree can be compared by
4658
4779
  * hash instead of by prose.
4780
+ *
4781
+ * Navigation is measured, not assumed. A scroll is spent only when a
4782
+ * scrollable node is on screen and this exact screen has had fewer than
4783
+ * {@link SCROLLS_PER_SCREEN}; a back only when the trail has a parent and this
4784
+ * screen has had fewer than {@link BACKS_PER_SCREEN}. The trail itself is
4785
+ * updated from the page the screen actually became, so a tap that lands on an
4786
+ * earlier page rewinds it exactly as a back would — HapRay's state stack does
4787
+ * the same thing, but asks a model whether the page matches.
4659
4788
  */
4660
4789
  declare function explore(device: ExplorationDevice, options: ExplorationOptions): Promise<ExplorationResult>;
4661
4790
  /**
@@ -4671,6 +4800,10 @@ interface ExplorationHost {
4671
4800
  dump(): Promise<readonly UiNode[]>;
4672
4801
  /** One tap at the centre of `bounds`. */
4673
4802
  tap(bounds: string): Promise<void>;
4803
+ /** One swipe inside `bounds`. Absent when the host cannot scroll. */
4804
+ swipe?(bounds: string, direction: ScrollDirection): Promise<void>;
4805
+ /** One system back. Absent when the host cannot go back. */
4806
+ back?(): Promise<void>;
4674
4807
  now(): number;
4675
4808
  sleep(ms: number): Promise<void>;
4676
4809
  }
@@ -4904,6 +5037,38 @@ declare class ScenarioRunner {
4904
5037
  */
4905
5038
  declare function writeRunFiles(outDir: string, result: RunResult): void;
4906
5039
 
5040
+ /**
5041
+ * The irreversible-action guard, shared by the GUI agent and model-guided
5042
+ * exploration.
5043
+ *
5044
+ * It lives in its own module because `agent.ts` and `explore.ts` both need it,
5045
+ * and an import in either direction between those two would make a cycle:
5046
+ * `agent.ts` already imports `hashTree` from `explore.ts`.
5047
+ *
5048
+ * The rule is the same on both paths: a label that names an act is refused,
5049
+ * while a screen that merely mentions a topic is not. `Payment settings` is a
5050
+ * page a walk may open; `立即支付` is money leaving an account.
5051
+ */
5052
+
5053
+ /** One irreversible action the guard recognises. */
5054
+ interface IrreversiblePattern {
5055
+ readonly pattern: RegExp;
5056
+ /** Why the action is refused; the text a refusal records. */
5057
+ readonly why: string;
5058
+ /** A label that matches `pattern`, so a test can prove the row is live. */
5059
+ readonly sample: string;
5060
+ }
5061
+ /**
5062
+ * The actions the guard refuses.
5063
+ *
5064
+ * Each pattern names an act, not a topic: `Payment settings` is a screen a
5065
+ * walk may legitimately open, while `立即支付` is money leaving an account.
5066
+ * Matching on a bare substring would block the settings page a task needs.
5067
+ */
5068
+ declare const IRREVERSIBLE_PATTERNS: readonly IrreversiblePattern[];
5069
+ /** Why tapping this node is irreversible, or `undefined` when it is safe. */
5070
+ declare function irreversibleReason(node: UiNode): string | undefined;
5071
+
4907
5072
  /**
4908
5073
  * The model-driven UI agent (HapRay parity row 5).
4909
5074
  *
@@ -5025,24 +5190,6 @@ interface AgentOptions {
5025
5190
  /** Let the guard's refusals through. Off by default. */
5026
5191
  readonly allowIrreversible?: boolean;
5027
5192
  }
5028
- /** One irreversible action the guard recognises. */
5029
- interface IrreversiblePattern {
5030
- readonly pattern: RegExp;
5031
- /** Why the action is refused; the text a refusal records. */
5032
- readonly why: string;
5033
- /** A label that matches `pattern`, so a test can prove the row is live. */
5034
- readonly sample: string;
5035
- }
5036
- /**
5037
- * The actions the guard refuses.
5038
- *
5039
- * Each pattern names an act, not a topic: `Payment settings` is a screen a
5040
- * walk may legitimately open, while `立即支付` is money leaving an account.
5041
- * Matching on a bare substring would block the settings page a task needs.
5042
- */
5043
- declare const IRREVERSIBLE_PATTERNS: readonly IrreversiblePattern[];
5044
- /** Why tapping this node is irreversible, or `undefined` when it is safe. */
5045
- declare function irreversibleReason(node: UiNode): string | undefined;
5046
5193
  /** One line naming what a decision does, for a transcript or a history entry. */
5047
5194
  declare function describeDecision(decision: AgentDecision): string;
5048
5195
  /**
@@ -5382,7 +5529,23 @@ declare function measureNaming(bytes: Uint8Array, answer: NamingAnswer): Promise
5382
5529
 
5383
5530
  /** The slice of `fetch` this client needs. Injected, never imported. */
5384
5531
  type AgentFetch = (url: string, init: RequestInit) => Promise<Response>;
5385
- interface HttpAgentModelOptions {
5532
+ /**
5533
+ * How a turn is rendered into a request, and how the answer is read back.
5534
+ *
5535
+ * The two travel together because they are one contract: a prompt that asks for
5536
+ * an evidence citation cannot be read by a parser that insists on a gesture.
5537
+ * The GUI agent is the default; anything else supplies its own pair.
5538
+ */
5539
+ interface AgentTurnShape {
5540
+ /** The user message for one turn. */
5541
+ prompt(turn: AgentTurn): string;
5542
+ /** The answer as a decision, or a refusal naming what came back. */
5543
+ parse(content: string): AgentDecision;
5544
+ }
5545
+ /** The GUI-driving shape: a screen to act on, an action or a verified `done`. */
5546
+ declare const GUI_TURN: AgentTurnShape;
5547
+ /** What any OpenAI-compatible client needs: an endpoint, a key, a model. */
5548
+ interface HttpModelOptions {
5386
5549
  /** The endpoint root, without `/chat/completions`. */
5387
5550
  readonly baseUrl: string;
5388
5551
  readonly apiKey: string;
@@ -5391,6 +5554,30 @@ interface HttpAgentModelOptions {
5391
5554
  /** Request timeout in ms. Defaults to 60 s. */
5392
5555
  readonly timeoutMs?: number;
5393
5556
  }
5557
+ interface HttpAgentModelOptions extends HttpModelOptions {
5558
+ /**
5559
+ * How a turn becomes a request and how its answer is read. Defaults to
5560
+ * {@link GUI_TURN}.
5561
+ *
5562
+ * A caller whose turn is not a screen to drive — the root-cause report, whose
5563
+ * turn carries the evidence, or exploration, whose turn carries a list of
5564
+ * elements — supplies its own shape. Without this the model would be told to
5565
+ * answer with a gesture and an `expect` block, and a correct answer would
5566
+ * then be rejected for having neither.
5567
+ */
5568
+ readonly shape?: AgentTurnShape;
5569
+ }
5570
+ /**
5571
+ * A text-in, text-out model client.
5572
+ *
5573
+ * Exploration needs exactly this: one prompt, one answer it parses itself. It
5574
+ * is the same transport as {@link httpAgentModel} without the GUI turn contract,
5575
+ * so a caller that has its own prompt does not have to pretend it is driving a
5576
+ * screen.
5577
+ */
5578
+ interface ChatModel {
5579
+ complete(prompt: string): Promise<string>;
5580
+ }
5394
5581
  interface AgentConfig {
5395
5582
  readonly baseUrl: string;
5396
5583
  readonly apiKey: string;
@@ -5406,13 +5593,125 @@ interface AgentConfig {
5406
5593
  */
5407
5594
  declare function readAgentConfig(env: Record<string, string | undefined>): AgentConfig | undefined;
5408
5595
  /**
5409
- * A model client over an OpenAI-compatible endpoint.
5596
+ * A text completion client over an OpenAI-compatible endpoint.
5410
5597
  *
5411
5598
  * The options are validated once, at construction, so a misconfiguration fails
5412
- * before a device is touched rather than on the first decision.
5599
+ * before a device is touched rather than on the first prompt.
5600
+ */
5601
+ declare function httpChatModel(options: HttpModelOptions): ChatModel;
5602
+ /**
5603
+ * A model client for a GUI-driving turn.
5604
+ *
5605
+ * The shape is applied here rather than by the caller so the two halves of a
5606
+ * turn — the prompt that asks and the parser that reads — are always the same
5607
+ * pair. Parsing happens in the client, so an error names the answer rather than
5608
+ * the step, which is where the cause actually is.
5413
5609
  */
5414
5610
  declare function httpAgentModel(options: HttpAgentModelOptions): AgentModel;
5415
5611
 
5612
+ /**
5613
+ * The model-guided exploration turn (HapRay parity row 38).
5614
+ *
5615
+ * HapRay's `llm_strategy.py` annotates a screenshot with red boxes, asks a
5616
+ * vision model which numbered element to tap, and then trusts the answer: an
5617
+ * index past the end of the list silently clicks element 0, an unparseable
5618
+ * answer clicks the first element, and a failed call clicks the first button.
5619
+ * The model also decides `scroll` / `back` / `stop`, and a second model call
5620
+ * per stack entry decides whether the screen counts as a new page.
5621
+ *
5622
+ * This is the same decision, made checkable:
5623
+ *
5624
+ * - **The offer is the screen.** The elements in the prompt are exactly the
5625
+ * elements the walk found in the dump it just took. An answer names an index
5626
+ * into that list; the chooser maps it back to the identity the walk records,
5627
+ * and an index outside the list is a refusal naming both numbers. There is no
5628
+ * silent fallback to element 0.
5629
+ * - **The turn is text.** The tree already carries the labels and the bounds;
5630
+ * sending rendered nodes costs fewer tokens than a screenshot and has no
5631
+ * annotation step whose failure mode is "the boxes are in the wrong place".
5632
+ * - **The model cannot invent a gesture.** It chooses among `tap` (an offered
5633
+ * element), `scroll`, `back` and `stop`. It never supplies coordinates, so
5634
+ * the worst a hostile answer can do is pick a bad node the walk already
5635
+ * considered — and irreversible ones are not offered at all.
5636
+ * - **No state comparator is needed.** HapRay asks a model "same page?" on
5637
+ * every transition. The answer to that is `hashPageShape`, computed from the
5638
+ * tree: same structure, different data (or a scroll) is the same page. The
5639
+ * walk measures it and rewinds its trail; no second model call, no guess.
5640
+ */
5641
+
5642
+ /** One element offered to the model, with its position in the offer. */
5643
+ interface StrategyElement {
5644
+ readonly index: number;
5645
+ readonly type: string;
5646
+ readonly text: string;
5647
+ readonly bounds: string;
5648
+ readonly depth: number;
5649
+ }
5650
+ /** Everything one exploration prompt contains. */
5651
+ interface StrategyTurn {
5652
+ /** The bundle the walk must stay inside, when one was named. */
5653
+ readonly app?: string;
5654
+ /** Zero-based index of the step being decided. */
5655
+ readonly step: number;
5656
+ readonly maxSteps: number;
5657
+ /** The current screen, as `renderTree` renders it. */
5658
+ readonly screen: string;
5659
+ readonly elements: readonly StrategyElement[];
5660
+ /** Recent steps, oldest first, as one line each. */
5661
+ readonly history: readonly string[];
5662
+ readonly canScroll: boolean;
5663
+ readonly canBack: boolean;
5664
+ }
5665
+ /** What a model may answer. */
5666
+ type StrategyAnswer = {
5667
+ readonly action: 'tap';
5668
+ readonly element: number;
5669
+ readonly reason: string;
5670
+ } | {
5671
+ readonly action: 'scroll';
5672
+ readonly direction: ScrollDirection;
5673
+ readonly reason: string;
5674
+ } | {
5675
+ readonly action: 'back';
5676
+ readonly reason: string;
5677
+ } | {
5678
+ readonly action: 'stop';
5679
+ readonly reason: string;
5680
+ };
5681
+ /** An answer that could not be read, with what was wrong. */
5682
+ interface StrategyRefusal {
5683
+ readonly action: 'refused';
5684
+ readonly detail: string;
5685
+ }
5686
+ /**
5687
+ * The prompt for one exploration step.
5688
+ *
5689
+ * Deterministic: the same turn renders to the same string. The answer formats
5690
+ * are written out literally because a model that invents an action name fails
5691
+ * far from the answer that caused it, and only the actions the screen allows
5692
+ * are listed — asking for an action the walk will refuse wastes a turn.
5693
+ */
5694
+ declare function explorationPrompt(turn: StrategyTurn): string;
5695
+ /**
5696
+ * Read a model's answer.
5697
+ *
5698
+ * The answer is data from outside the package, so every field is checked. A
5699
+ * content problem becomes a refusal, not a thrown error: a confused model
5700
+ * should cost one step, not the walk. Transport failures are the caller's
5701
+ * (the chooser does not catch them) because an unreachable endpoint is a
5702
+ * configuration problem and continuing would hide it.
5703
+ */
5704
+ declare function parseStrategyAnswer(content: string): StrategyAnswer | StrategyRefusal;
5705
+ /**
5706
+ * A chooser over one model client.
5707
+ *
5708
+ * The index is mapped to the identity the walk offered, and every answer the
5709
+ * walk cannot honour becomes a `refusal` — the walk records it and lets the
5710
+ * deterministic order decide. The prompt and parser are one pair here for the
5711
+ * same reason the GUI agent's are: a prompt asks for what its parser reads.
5712
+ */
5713
+ declare function llmChooser(model: ChatModel): ExplorationChooser;
5714
+
5416
5715
  /**
5417
5716
  * One `native_hook` row with camelCase field names.
5418
5717
  *
@@ -7083,4 +7382,227 @@ interface FlamegraphPageInput {
7083
7382
  */
7084
7383
  declare function renderFlamegraphHtml(input: FlamegraphPageInput): string;
7085
7384
 
7086
- export { ANIMATION_BANDS, type ActionContext, type ActionDevice, type ActionOutcome, type ActiveAlloc, type AddressRef, type AgentConfig, type AgentDecision, type AgentDevice, type AgentFetch, type AgentHistoryEntry, type AgentModel, type AgentOptions, type AgentResult, type AgentStatus, type AgentStep, type AgentStepStatus, type AgentTranscript, type AgentTurn, type AnalyzeContext, type AnalyzeResult, type Analyzer, type AnalyzerRun, type AnalyzerSection, type AnimationAnalysis, type AnimationLabel, type AnimationSeverity, type AppIdentity, BUNDLE_RENDERED_FILES, type BaselineComparison, type BelowThresholdPattern, type BinaryFacts, type BinaryInput, type BinaryReport, type BinderAnalysis, BinderAnalyzer, type BinderEndpoint, type BinderEvent, type BinderInterfaceStat, type BinderProcessStat, BinderQuery, type BinderThreadStat, type BinderTransaction, type BundleRerenderInput, CATEGORY_EXTENSIONS, CATEGORY_MAX_BYTES, COLLECTOR_NAMES, type CallchainSample, type CallstackEvent, type CallstackEventWithArgs, CallstackQuery, type CapabilityId, type CapabilityInputs, CapabilityMatrix, type CapabilityState, type CaseLoad, type CategoryTotal, type CollectOptions, type CollectSession, type Collector, type CollectorName, type CompiledRule, type ComponentReuse, ComponentReuseAnalyzer, type ConnectOptions, type ContentPattern, CoverageAnalyzer, type CoverageCounts, type CoverageFile, type CoverageRatio, type CoverageReport, type CreateEmulatorRequest, DEFAULT_HILOG_RULES, DEFAULT_QUERY_LIMIT, DEVICE_PERF_PATH, DEVICE_SCREENSHOT_PATH, DEVICE_UI_PATH, type DeltaStatus, type DepGraph, type DepGraphEdge, type DepGraphFile, Device, type DeviceDeps, type DeviceIdentity, DeviceNotFoundError, type DiscoveredCase, type DrillDownHandle, type DuplicateGroup, EM_AARCH64, EXCLUDE_PATTERNS, type ElfFile, type ElfSection, type ElfSymbol, EmptyFrameAnalyzer, type EmptyFrameFilter, type EmulatorBackend, EmulatorClient, type EmulatorClientOptions, EmulatorCommandError, type EmulatorImage, EmulatorImageMissingError, type EmulatorInstance, EmulatorLifecycle, type EmulatorLifecycleOptions, EmulatorNotFoundError, type EmulatorStartResult, type EmulatorStopResult, type Env, type Evidence, type EvidenceKind, type ExpectPresent, type ExpectationOutcome, type ExplorationAction, type ExplorationClock, type ExplorationDevice, type ExplorationDeviceOptions, type ExplorationHost, type ExplorationOptions, type ExplorationOutcome, type ExplorationResult, type ExplorationState, type ExplorationStep, type ExplorationStrategy, type ExplorationTargetDevice, FLAMEGRAPH_FILES, FPS_COMMAND, FTRACE_CATEGORIES, FaultTreeAnalyzer, type FaultTreeSignals, type Fidelity, type FileCategory, type FileRule, FlamegraphAnalyzer, type FlamegraphPageInput, type FoldedStack, type FpsBucket, type FpsWindow, type Frame, FrameAnalyzer, type FrameFlag, FrameLoadAnalyzer, FrameLoadIndex, type FrameLoadIndexInput, type FrameLoadThread, FrameQuery, type FrameStats, type FrameType, type FtraceOptions, type FunctionRange, GEOMETRY_TOLERANCE_PX, GcAnalyzer, type GcSignals, type Gesture, GestureDriver, type GestureResult, HILOG_COMMAND, HIPROFILER_PLUGIN_NAMES, HITCH_COMMAND, HITRACE_DEFAULT_CATEGORIES, type HapAnalysis, type HapPackage, type HarEdge, Hdc, HdcNotFoundError, type HdcOptions, type HdcResult, type HdcSlice, type HdcTarget, type HidumperCapture, HidumperCollector, type HidumperSnapshot, HilogAnalyzer, HilogCollector, type HilogLevel, type HilogLine, type HilogMatch, type HilogParseOptions, type HilogRule, type HiperfCapture, type HiperfCollectOptions, HiperfCollector, type HiprofilerCollectOptions, type HiprofilerCollectRequest, HiprofilerCollector, type HiprofilerConfigOptions, type HiprofilerPlugin, type HiprofilerPluginName, HitraceCollector, type HttpAgentModelOptions, IGNORED_ATTRIBUTES, IRREVERSIBLE_PATTERNS, type ImageComparison, IngestError, InstantQuery, type InstructionClass, type InstructionCounts, type InventoryFile, type IrreversiblePattern, type JsheapCapture, JsheapCollector, MAX_QUERY_LIMIT, METRIC_DIRECTIONS, MIN_BUFFER_PAGES, MIN_HASH_PIXELS, MemMeasureQuery, MemoryAnalyzer, MemoryMeasureAnalyzer, type MemoryPluginOptions, type MetadataPattern, type Metric, type MetricDelta, type MetricDirection, type MetricUnit, type ModuleDecl, type NamedQueryDefinition, type NamedQueryInfo, type NamedQueryResult, type NamingAnswer, type NamingCase, type NamingQuestion, type NamingReport, type NativeCategory, type NativeEventKind, type NativeHookEvent, type NativeHookFrame, NativeHookQuery, type NativeHookStatistic, NativeMemoryAnalyzer, type NativeMemoryResult, type NativeNames, type NativeTimelineBucket, type NativehookOptions, OhosPerfError, type OptimizationAnalysis, type OptimizationBasis, type OptimizationLevel, type OptimizationPotential, type OptimizationVerdict, type OversizedFile, PARITY_ROWS, PLANE_A_PLUGINS, type ParityRow, type ParityStatus, type PerfCallchain, type PerfFileAttribution, type PerfFunction, type PerfLeafAttribution, PerfQuery, type PerfSampleRow, type PerfThread, type PixelOnlyChange, type ProbeResult, type ProbeRunner, type ProbeSnapshot, type ProcessInfo, type ProcessMeasure, type ProcessMeasureFilter, ProcessQuery, ProcfsCollector, type ProcfsSample, type ProcfsStatus, type Provenance, type QueryArgument, type QueryContext, type QueryHandle, REPORT_SCHEMA_VERSION, type RecoveredSymbol, type RecoveryResult, type Rect, type RedundancyLevel, type RedundancyType, RedundantFileAnalyzer, type RedundantFileEntry, type RedundantFileReport, type RedundantThreadPattern, type RedundantThreadsSummary, type RegionPixelChange, RenderAnalyzer, type ReplayResult, type ReportGenerator, type ReportInput, type ReportModel, type ReportScenario, type ReportSection, type ReportSummary, type ReportTotals, type RgbaImage, RsSkipAnalyzer, type RsSkipFrame, type RsSkipResult, type RsSkipTraceMethod, type RuleMatch, type RuleMatchKind, type RunOptions, type RunResult, type RunStepResult, type RunnerCollectOptions, type RunnerDevice, SECTION_TITLES, type Scenario, type ScenarioAction, ScenarioRunner, type ScenarioStep, Scene, type SceneLayout, type SceneMetadata, type SceneStep, type SceneStepRef, type ScenesComparison, SchedQuery, type SchedSlice, type ScreenshotCapture, ScreenshotCollector, type Selector, type SelectorRect, type SmapsRollup, StartupAnalyzer, StartupQuery, type StartupRecord, type StepCapture, type StepComparison, type StepExpectation, type StepStatus, Streamer, StreamerNotFoundError, type StreamerOptions, type SymbolStat, SymbolsAnalyzer, TECH_RULES, type TechRule, type ThreadAnalysis, type ThreadAnalysisSummary, ThreadAnalyzer, type ThreadInfo, ThreadQuery, type ThreadState, ThreadStateQuery, type ThreadWakeupResult, type ThreadWakeupThread, type TimeRange, type TimingCycle, type TraceCollectOptions, type Trend, type TrendOrder, type TrendPoint, type TrendRun, type TrendSeries, UI_DIFF_FILES, UiAnalyzer, type UiCompareOptions, type UiDiff, type UiDiffSide, type UiNode, type UiTreeDiff, type UiTreeDifference, UitestCollector, type UnmeasuredRegion, type UnreleasedRow, type UnresolvedAddress, type VsyncAnalysis, VsyncAnalyzer, type VsyncPeriod, type VsyncPeriodKind, type VsyncSeverity, type WakeupEvent, type WindowHitches, type ZipArchive, type ZipEntry, addressOfOffset, agentPrompt, aggregateUnreleased, analyseAnimations, analyzeBinaries, analyzeHap, analyzeThreadWakeup, animationSeverity, buildDepGraph, buildHiprofilerConfig, buildInventory, buildMatrix, buildNativeTimeline, buildReport, buildTrend, categorize, classifyInstruction, classifyNativePath, classifyOptimization, compareImages, compareRegion, compareResults, compareSceneDirs, compareScenes, compileRules, computeBinderAnalysis, computeComponentReuse, computeFaultTree, computeFpsWindows, computeGc, computeRsSkip, computeThreadAnalysis, computeVsyncAnomalies, connect, countInstructions, createSceneLayout, cropRegion, decodePng, defaultAnalyzers, describeDecision, deviceExplorationHost, dhash, diffTrees, discoverCases, encodePng, escapeHtml, evaluateExpectation, evidence, executeAction, explorationDevice, explore, extractBinaries, filterEmptyFrames, flattenUiTree, ftracePlugin, functionAt, gpuPlugin, hapSection, hashTree, hiperfRecordCommand, httpAgentModel, ingestScene, inspectBinary, irreversibleReason, isUnresolvedSymbol, isZip, loadCases, lookupQuery, markRegions, matchHapRules, matchRules, matchSelector, measureNaming, memoryPlugin, metric, nativeEventKind, nativehookPlugin, nodeIdentity, normaliseName, openDb, openZip, optimizationSection, pairNativeMemory, paritySummary, parseBounds, parseCoverageReport, parseDecision, parseFpsCounts, parseHilogLine, parseHilogText, parseHiperfSummary, parseHitches, parseProcfsStatus, parseRedundantFile, parseScenario, parseSelector, parseSmapsRollup, planNextAction, queryDefinitions, readAgentConfig, readElf, readHidumperCapture, readHilogText, readJsheapSnapshot, readProcfsSamples, readSceneMetadata, readUiTree, recoverSymbols, renderBundle, renderEvidenceCsv, renderFlamegraphHtml, renderFlamegraphSvg, renderMetricsCsv, renderReportHtml, renderReportJson, renderReportXlsx, renderScenesComparison, renderSummaryJson, renderTree, renderTrendHtml, renderTrendJson, renderUiDiffHtml, replayAgent, resolveAppIdentity, resolveAppIpids, resolveQueryLimit, resolveSelector, round2HalfEven, runAgent, runAnalyzerSections, runAnalyzers, runDrillDown, runNamedQuery, runProbe, sortSteps, summarizeReport, symbolIndex, tableRowCounts, trendRunFromReport, unknownQueryError, validateRules, writeProcfsSamples, writeRunFiles, writeSceneMetadata, xpowerPlugin };
7385
+ /**
7386
+ * The root-cause document (HapRay parity row 36).
7387
+ *
7388
+ * HapRay's `root-cause` reads its own report JSON files, hands them to a model,
7389
+ * and writes Markdown. The artifact is empty without an endpoint: `--skip-llm`
7390
+ * writes "Pending Agent Inference" placeholders, so a run with no model produces
7391
+ * nothing a reader can use.
7392
+ *
7393
+ * This module is the half that does not need a model. It ranks the evidence the
7394
+ * analyzers already produced — by *our* severities, in a total order — and
7395
+ * states a verdict from the highest one. The model, when there is one, adds a
7396
+ * `suspects` array on top; it never supplies the ranking.
7397
+ *
7398
+ * That split is the point. A model asked "what is the root cause" answers with
7399
+ * prose that cannot be checked. A model asked "here are 14 evidence items, cite
7400
+ * the ids you are reasoning from" can have its citations verified, which is what
7401
+ * {@link RootCauseSuspect.ungrounded} records.
7402
+ */
7403
+ /** The root-cause document schema. A change to any shape below bumps this. */
7404
+ declare const ROOT_CAUSE_SCHEMA_VERSION = 1;
7405
+ /** Who produced the document; the version is the CLI package version. */
7406
+ interface RootCauseGenerator {
7407
+ name: string;
7408
+ version: string;
7409
+ }
7410
+ /** The scene the document describes. Inputs are copied, never referenced. */
7411
+ interface RootCauseScene {
7412
+ app: string;
7413
+ device: string;
7414
+ window: TimeRange;
7415
+ }
7416
+ /** One evidence item, restated so a reader needs no other file. */
7417
+ interface RootCauseObservation {
7418
+ /** The `Evidence.id` this restates; the model cites these. */
7419
+ evidenceId: string;
7420
+ kind: EvidenceKind;
7421
+ severity: 'info' | 'warn' | 'critical';
7422
+ /** The analyzer's own sentence, verbatim. */
7423
+ explain: string;
7424
+ subject: {
7425
+ process: string;
7426
+ thread?: string;
7427
+ frameNo?: number;
7428
+ };
7429
+ /** The measured facts, copied verbatim from the evidence item. */
7430
+ signals: Record<string, number | string | readonly string[]>;
7431
+ }
7432
+ /** One cause a model proposed, with the citations that back it. */
7433
+ interface RootCauseSuspect {
7434
+ /** 1-based, in the order the model returned them. */
7435
+ rank: number;
7436
+ /** The evidence ids the model cited that this run actually produced. */
7437
+ evidenceIds: string[];
7438
+ rootCause: string;
7439
+ fix: string;
7440
+ confidence: 'high' | 'medium' | 'low';
7441
+ /**
7442
+ * Names the model cited that no evidence carried. A non-empty list means the
7443
+ * suspect is *not* grounded in this run: the reader is told rather than being
7444
+ * shown an invented file, symbol or thread as though it were measured.
7445
+ */
7446
+ ungrounded: string[];
7447
+ triggerChain?: string;
7448
+ }
7449
+ /** The model's contribution, present only when a model answered. */
7450
+ interface RootCauseAnalysis {
7451
+ model: string;
7452
+ summary: string;
7453
+ suspects: RootCauseSuspect[];
7454
+ caveats: string[];
7455
+ needsMoreData: string[];
7456
+ }
7457
+ /** The deterministic verdict, always present. */
7458
+ interface RootCauseSummary {
7459
+ totals: {
7460
+ info: number;
7461
+ warn: number;
7462
+ critical: number;
7463
+ /**
7464
+ * How many observations are measurement gaps rather than findings. A run
7465
+ * over a sparse capture is mostly gaps, and a reader has to be able to tell
7466
+ * "nothing was wrong" from "nothing could be measured".
7467
+ */
7468
+ gaps: number;
7469
+ };
7470
+ /** One sentence, from the highest-severity observation. */
7471
+ verdict: string;
7472
+ }
7473
+ /** The complete, versioned document. */
7474
+ interface RootCauseDocument {
7475
+ schemaVersion: typeof ROOT_CAUSE_SCHEMA_VERSION;
7476
+ generator: RootCauseGenerator;
7477
+ scene: RootCauseScene;
7478
+ summary: RootCauseSummary;
7479
+ /** Ranked by severity then id: a total order, so two runs agree. */
7480
+ observations: RootCauseObservation[];
7481
+ analysis?: RootCauseAnalysis;
7482
+ }
7483
+ /** Everything {@link buildRootCauseDocument} needs; all values are measured. */
7484
+ interface RootCauseInput {
7485
+ app: string;
7486
+ device: string;
7487
+ window: TimeRange;
7488
+ generator: RootCauseGenerator;
7489
+ evidence: readonly Evidence[];
7490
+ }
7491
+ /**
7492
+ * Rank evidence for a reader: most urgent first, ties broken by id.
7493
+ *
7494
+ * The tie-break is not cosmetic. Without it the order depends on the input
7495
+ * array, and two runs over the same capture would produce documents that diff
7496
+ * against each other for no reason — the same defect the rest of this package
7497
+ * spends its determinism tests preventing.
7498
+ */
7499
+ declare function rankObservations(evidence: readonly Evidence[]): RootCauseObservation[];
7500
+ /**
7501
+ * Build the deterministic document.
7502
+ *
7503
+ * The `analysis` field is absent: only {@link askRootCause} adds it, and only
7504
+ * when a model answered. A caller that renders the document without one gets a
7505
+ * usable report, which is the property HapRay's `--skip-llm` lacks.
7506
+ */
7507
+ declare function buildRootCauseDocument(input: RootCauseInput): RootCauseDocument;
7508
+
7509
+ /**
7510
+ * The model turn for the root-cause report (HapRay parity row 36).
7511
+ *
7512
+ * One `decide()` call, not a loop: the document is already the question, and
7513
+ * the answer is prose attached to it. Two things differ from HapRay's version,
7514
+ * and both are about making the answer checkable:
7515
+ *
7516
+ * 1. **The model cites evidence ids.** HapRay hands over its report JSON and
7517
+ * asks for a root cause; nothing ties the answer to a measured item, so an
7518
+ * invented finding reads like a real one. Here the prompt carries the ranked
7519
+ * observations *with their ids*, and an id the run did not produce is moved
7520
+ * to {@link RootCauseSuspect.ungrounded}.
7521
+ * 2. **The names are looked up.** A suspect that mentions `aboutToAppear`,
7522
+ * `libfoo.so` or a thread name is checked against what the evidence actually
7523
+ * carried. HapRay has no such check, and its `with_source` mode needs a
7524
+ * source tree and a symbol index to get anywhere close.
7525
+ *
7526
+ * Neither check is semantic: they answer one question — "did the model name
7527
+ * something this run measured?" — and leave interpretation to the reader.
7528
+ */
7529
+ /** The most evidence items a prompt carries, most urgent first. */
7530
+ declare const PROMPT_EVIDENCE_LIMIT = 40;
7531
+ /**
7532
+ * The prompt for one root-cause turn.
7533
+ *
7534
+ * A plain string, like `agentPrompt`: whatever client a caller brings turns it
7535
+ * into its own request shape. The observations are rendered rather than
7536
+ * `JSON.stringify`-ed so the ids are impossible to miss — a model that cannot
7537
+ * see them cannot cite them.
7538
+ */
7539
+ declare function rootCausePrompt(document: RootCauseDocument): string;
7540
+ /**
7541
+ * How an HTTP client must render and read this turn.
7542
+ *
7543
+ * The default `GUI_TURN` is the wrong shape twice over: it would tell the model
7544
+ * to answer with a gesture and an `expect` block, and it would then reject the
7545
+ * answer it asked for, because `parseDecision` insists on an `action` or
7546
+ * `done`. The answer here is JSON prose with citations, so the parser accepts
7547
+ * any JSON object and leaves validation to {@link parseRootCauseAnswer}, which
7548
+ * knows the evidence ids.
7549
+ */
7550
+ declare const ROOT_CAUSE_TURN: AgentTurnShape;
7551
+ /**
7552
+ * Read a model's answer.
7553
+ *
7554
+ * The answer is data from outside this package, so every field is checked: a
7555
+ * non-object, a non-JSON string, or a suspect that is not an object is a
7556
+ * refusal naming what was wrong. An id the run did not produce is not a
7557
+ * refusal — it is recorded in `ungrounded`, because the reader needs to see
7558
+ * what the model claimed as much as what it got right.
7559
+ */
7560
+ declare function parseRootCauseAnswer(content: string, document: RootCauseDocument, model: string): RootCauseAnalysis;
7561
+ /**
7562
+ * Every string the evidence actually carried.
7563
+ *
7564
+ * Process, thread, any string signal value, and every identifier-shaped token
7565
+ * in the analyzer's own `explain` sentence and in the item's `kind`. The last
7566
+ * two matter because the analyzers name the inputs they were missing —
7567
+ * `ui.json`, `trace.thread_state`, `coverageReport.json` — and a model quoting
7568
+ * those back is repeating what this run reported, not inventing a symbol. A set
7569
+ * rather than a list because the check is membership, and the vocabulary of one
7570
+ * run is small.
7571
+ */
7572
+ declare function groundingVocabulary(document: RootCauseDocument): Set<string>;
7573
+ /**
7574
+ * Names a suspect mentions that the run never measured.
7575
+ *
7576
+ * Only *identifier-shaped* tokens are candidates: a token with a dot, an
7577
+ * underscore, a hyphen, an embedded capital, or a file extension. Ordinary
7578
+ * prose is not checked, because "the main thread was busy" is an interpretation
7579
+ * and not a claim about a measured entity — flagging its words would make the
7580
+ * check noise and train a reader to ignore it.
7581
+ *
7582
+ * A citation id is not a name: it is checked separately by
7583
+ * {@link parseRootCauseAnswer}, and a suspect whose only "unknown" is an id it
7584
+ * already had rejected would report the same problem twice.
7585
+ */
7586
+ declare function ungroundedNames(suspect: RootCauseSuspect, vocabulary: Set<string>): string[];
7587
+ /**
7588
+ * Ask the model once, and attach its answer to the document.
7589
+ *
7590
+ * The deterministic half is copied unchanged: the model adds a section, it does
7591
+ * not replace the ranking. A suspect naming something unmeasured keeps its
7592
+ * citation check and gains the names in `ungrounded`, so one field answers
7593
+ * "which ids were real" and the other "which names were real".
7594
+ */
7595
+ declare function askRootCause(model: AgentModel, document: RootCauseDocument, options: {
7596
+ model: string;
7597
+ }): Promise<RootCauseDocument>;
7598
+
7599
+ /**
7600
+ * Render the document as Markdown.
7601
+ *
7602
+ * Deterministic: the same document renders to the same bytes, because every
7603
+ * list it walks is already in a total order and every map is sorted on the way
7604
+ * out.
7605
+ */
7606
+ declare function renderRootCauseMarkdown(document: RootCauseDocument): string;
7607
+
7608
+ export { ANIMATION_BANDS, type ActionContext, type ActionDevice, type ActionOutcome, type ActiveAlloc, type AddressRef, type AgentConfig, type AgentDecision, type AgentDevice, type AgentFetch, type AgentHistoryEntry, type AgentModel, type AgentOptions, type AgentResult, type AgentStatus, type AgentStep, type AgentStepStatus, type AgentTranscript, type AgentTurn, type AgentTurnShape, type AnalyzeContext, type AnalyzeResult, type Analyzer, type AnalyzerRun, type AnalyzerSection, type AnimationAnalysis, type AnimationLabel, type AnimationSeverity, type AppIdentity, BUNDLE_RENDERED_FILES, type BaselineComparison, type BelowThresholdPattern, type BinaryFacts, type BinaryInput, type BinaryReport, type BinderAnalysis, BinderAnalyzer, type BinderEndpoint, type BinderEvent, type BinderInterfaceStat, type BinderProcessStat, BinderQuery, type BinderThreadStat, type BinderTransaction, type BundleRerenderInput, CATEGORY_EXTENSIONS, CATEGORY_MAX_BYTES, COLLECTOR_NAMES, type CallchainSample, type CallstackEvent, type CallstackEventWithArgs, CallstackQuery, type CapabilityId, type CapabilityInputs, CapabilityMatrix, type CapabilityState, type CaseLoad, type CategoryTotal, type ChatModel, type CollectOptions, type CollectSession, type Collector, type CollectorName, type CompiledRule, type ComponentReuse, ComponentReuseAnalyzer, type ConnectOptions, type ContentPattern, CoverageAnalyzer, type CoverageCounts, type CoverageFile, type CoverageRatio, type CoverageReport, type CreateEmulatorRequest, DEFAULT_HILOG_RULES, DEFAULT_QUERY_LIMIT, DEVICE_PERF_PATH, DEVICE_SCREENSHOT_PATH, DEVICE_UI_PATH, type DeltaStatus, type DepGraph, type DepGraphEdge, type DepGraphFile, Device, type DeviceDeps, type DeviceIdentity, DeviceNotFoundError, type DiscoveredCase, type DrillDownHandle, type DuplicateGroup, EM_AARCH64, EXCLUDE_PATTERNS, type ElfFile, type ElfSection, type ElfSymbol, EmptyFrameAnalyzer, type EmptyFrameFilter, type EmulatorBackend, EmulatorClient, type EmulatorClientOptions, EmulatorCommandError, type EmulatorImage, EmulatorImageMissingError, type EmulatorInstance, EmulatorLifecycle, type EmulatorLifecycleOptions, EmulatorNotFoundError, type EmulatorStartResult, type EmulatorStopResult, type Env, type Evidence, type EvidenceKind, type ExpectPresent, type ExpectationOutcome, type ExplorationAction, type ExplorationCandidate, type ExplorationChoiceContext, type ExplorationChooser, type ExplorationClock, type ExplorationDevice, type ExplorationDeviceOptions, type ExplorationHost, type ExplorationOptions, type ExplorationOutcome, type ExplorationProposal, type ExplorationResult, type ExplorationState, type ExplorationStep, type ExplorationStepKind, type ExplorationStrategy, type ExplorationTargetDevice, FLAMEGRAPH_FILES, FPS_COMMAND, FTRACE_CATEGORIES, FaultTreeAnalyzer, type FaultTreeSignals, type Fidelity, type FileCategory, type FileRule, FlamegraphAnalyzer, type FlamegraphPageInput, type FoldedStack, type FpsBucket, type FpsWindow, type Frame, FrameAnalyzer, type FrameFlag, FrameLoadAnalyzer, FrameLoadIndex, type FrameLoadIndexInput, type FrameLoadThread, FrameQuery, type FrameStats, type FrameType, type FtraceOptions, type FunctionRange, GEOMETRY_TOLERANCE_PX, GUI_TURN, GcAnalyzer, type GcSignals, type Gesture, GestureDriver, type GestureResult, HILOG_COMMAND, HIPROFILER_PLUGIN_NAMES, HITCH_COMMAND, HITRACE_DEFAULT_CATEGORIES, type HapAnalysis, type HapPackage, type HarEdge, Hdc, HdcNotFoundError, type HdcOptions, type HdcResult, type HdcSlice, type HdcTarget, type HidumperCapture, HidumperCollector, type HidumperSnapshot, HilogAnalyzer, HilogCollector, type HilogLevel, type HilogLine, type HilogMatch, type HilogParseOptions, type HilogRule, type HiperfCapture, type HiperfCollectOptions, HiperfCollector, type HiprofilerCollectOptions, type HiprofilerCollectRequest, HiprofilerCollector, type HiprofilerConfigOptions, type HiprofilerPlugin, type HiprofilerPluginName, HitraceCollector, type HttpAgentModelOptions, type HttpModelOptions, IGNORED_ATTRIBUTES, IRREVERSIBLE_PATTERNS, type ImageComparison, IngestError, InstantQuery, type InstructionClass, type InstructionCounts, type InventoryFile, type IrreversiblePattern, type JsheapCapture, JsheapCollector, MAX_QUERY_LIMIT, METRIC_DIRECTIONS, MIN_BUFFER_PAGES, MIN_HASH_PIXELS, MemMeasureQuery, MemoryAnalyzer, MemoryMeasureAnalyzer, type MemoryPluginOptions, type MetadataPattern, type Metric, type MetricDelta, type MetricDirection, type MetricUnit, type ModuleDecl, type NamedQueryDefinition, type NamedQueryInfo, type NamedQueryResult, type NamingAnswer, type NamingCase, type NamingQuestion, type NamingReport, type NativeCategory, type NativeEventKind, type NativeHookEvent, type NativeHookFrame, NativeHookQuery, type NativeHookStatistic, NativeMemoryAnalyzer, type NativeMemoryResult, type NativeNames, type NativeTimelineBucket, type NativehookOptions, OhosPerfError, type OptimizationAnalysis, type OptimizationBasis, type OptimizationLevel, type OptimizationPotential, type OptimizationVerdict, type OversizedFile, PARITY_ROWS, PLANE_A_PLUGINS, PROMPT_EVIDENCE_LIMIT, type ParityRow, type ParityStatus, type PerfCallchain, type PerfFileAttribution, type PerfFunction, type PerfLeafAttribution, PerfQuery, type PerfSampleRow, type PerfThread, type PixelOnlyChange, type ProbeResult, type ProbeRunner, type ProbeSnapshot, type ProcessInfo, type ProcessMeasure, type ProcessMeasureFilter, ProcessQuery, ProcfsCollector, type ProcfsSample, type ProcfsStatus, type Provenance, type QueryArgument, type QueryContext, type QueryHandle, REPORT_SCHEMA_VERSION, ROOT_CAUSE_SCHEMA_VERSION, ROOT_CAUSE_TURN, type RecoveredSymbol, type RecoveryResult, type Rect, type RedundancyLevel, type RedundancyType, RedundantFileAnalyzer, type RedundantFileEntry, type RedundantFileReport, type RedundantThreadPattern, type RedundantThreadsSummary, type RegionPixelChange, RenderAnalyzer, type ReplayResult, type ReportGenerator, type ReportInput, type ReportModel, type ReportScenario, type ReportSection, type ReportSummary, type ReportTotals, type RgbaImage, type RootCauseAnalysis, type RootCauseDocument, type RootCauseGenerator, type RootCauseInput, type RootCauseObservation, type RootCauseScene, type RootCauseSummary, type RootCauseSuspect, RsSkipAnalyzer, type RsSkipFrame, type RsSkipResult, type RsSkipTraceMethod, type RuleMatch, type RuleMatchKind, type RunOptions, type RunResult, type RunStepResult, type RunnerCollectOptions, type RunnerDevice, SECTION_TITLES, type Scenario, type ScenarioAction, ScenarioRunner, type ScenarioStep, Scene, type SceneLayout, type SceneMetadata, type SceneStep, type SceneStepRef, type ScenesComparison, SchedQuery, type SchedSlice, type ScreenshotCapture, ScreenshotCollector, type ScrollDirection, type Selector, type SelectorRect, type SmapsRollup, StartupAnalyzer, StartupQuery, type StartupRecord, type StepCapture, type StepComparison, type StepExpectation, type StepStatus, type StrategyAnswer, type StrategyElement, type StrategyRefusal, type StrategyTurn, Streamer, StreamerNotFoundError, type StreamerOptions, type SymbolStat, SymbolsAnalyzer, TECH_RULES, type TechRule, type ThreadAnalysis, type ThreadAnalysisSummary, ThreadAnalyzer, type ThreadInfo, ThreadQuery, type ThreadState, ThreadStateQuery, type ThreadWakeupResult, type ThreadWakeupThread, type TimeRange, type TimingCycle, type TraceCollectOptions, type Trend, type TrendOrder, type TrendPoint, type TrendRun, type TrendSeries, UI_DIFF_FILES, UiAnalyzer, type UiCompareOptions, type UiDiff, type UiDiffSide, type UiNode, type UiTreeDiff, type UiTreeDifference, UitestCollector, type UnmeasuredRegion, type UnreleasedRow, type UnresolvedAddress, type VsyncAnalysis, VsyncAnalyzer, type VsyncPeriod, type VsyncPeriodKind, type VsyncSeverity, type WakeupEvent, type WindowHitches, type ZipArchive, type ZipEntry, addressOfOffset, agentPrompt, aggregateUnreleased, analyseAnimations, analyzeBinaries, analyzeHap, analyzeThreadWakeup, animationSeverity, askRootCause, buildDepGraph, buildHiprofilerConfig, buildInventory, buildMatrix, buildNativeTimeline, buildReport, buildRootCauseDocument, buildTrend, categorize, classifyInstruction, classifyNativePath, classifyOptimization, compareImages, compareRegion, compareResults, compareSceneDirs, compareScenes, compileRules, computeBinderAnalysis, computeComponentReuse, computeFaultTree, computeFpsWindows, computeGc, computeRsSkip, computeThreadAnalysis, computeVsyncAnomalies, connect, countInstructions, createSceneLayout, cropRegion, decodePng, defaultAnalyzers, describeDecision, deviceExplorationHost, dhash, diffTrees, discoverCases, encodePng, escapeHtml, evaluateExpectation, evidence, executeAction, explorationDevice, explorationPrompt, explore, extractBinaries, filterEmptyFrames, flattenUiTree, ftracePlugin, functionAt, gpuPlugin, groundingVocabulary, hapSection, hashPageShape, hashTree, hiperfRecordCommand, httpAgentModel, httpChatModel, ingestScene, inspectBinary, irreversibleReason, isUnresolvedSymbol, isZip, llmChooser, loadCases, lookupQuery, markRegions, matchHapRules, matchRules, matchSelector, measureNaming, memoryPlugin, metric, nativeEventKind, nativehookPlugin, nodeIdentity, normaliseName, openDb, openZip, optimizationSection, pairNativeMemory, paritySummary, parseBounds, parseCoverageReport, parseDecision, parseFpsCounts, parseHilogLine, parseHilogText, parseHiperfSummary, parseHitches, parseProcfsStatus, parseRedundantFile, parseRootCauseAnswer, parseScenario, parseSelector, parseSmapsRollup, parseStrategyAnswer, planNextAction, queryDefinitions, rankObservations, readAgentConfig, readElf, readHidumperCapture, readHilogText, readJsheapSnapshot, readProcfsSamples, readSceneMetadata, readUiTree, recoverSymbols, renderBundle, renderEvidenceCsv, renderFlamegraphHtml, renderFlamegraphSvg, renderMetricsCsv, renderReportHtml, renderReportJson, renderReportXlsx, renderRootCauseMarkdown, renderScenesComparison, renderSummaryJson, renderTree, renderTrendHtml, renderTrendJson, renderUiDiffHtml, replayAgent, resolveAppIdentity, resolveAppIpids, resolveQueryLimit, resolveSelector, rootCausePrompt, round2HalfEven, runAgent, runAnalyzerSections, runAnalyzers, runDrillDown, runNamedQuery, runProbe, sortSteps, summarizeReport, symbolIndex, tableRowCounts, trendRunFromReport, ungroundedNames, unknownQueryError, validateRules, writeProcfsSamples, writeRunFiles, writeSceneMetadata, xpowerPlugin };