rea-agents - v1.1.0
    Preparing search index...

    Owns the single active target shared by CLI and MCP adapters.

    Target transitions are serialized because each client dispatches Hopper API work on its dedicated Python thread, and switching targets tears that bridge down. A failed switch recreates the previous target instead of retaining a client whose bridge was already shut down.

    Implements

    Index
    • Read one detached session-owned Evidence record by semantic ID.

      Parameters

      • evidenceId: string

      Returns
          | {
              authority: | "shipped-artifact"
              | "controlled-replay"
              | "historical-reference"
              | "external-service"
              | "analyst-inference";
              confidence: "observed"
              | "derived"
              | "inferred";
              environment:
                  | {
                      architecture: string;
                      id: string;
                      isolation: "process"
                      | "none"
                      | "container"
                      | "virtual-machine";
                      platform: string;
                  }
                  | null;
              evidence_id: string;
              evidence_links: string[];
              limitations: string[];
              locations: (
                  | { address: string; kind: "address" }
                  | { end: string; kind: "address-range"; start: string }
                  | { kind: "artifact-path"; path: string }
                  | { kind: "file-offset"; offset: number }
                  | { end: number; kind: "file-offset-range"; start: number }
              )[];
              normalized_result: JSONType;
              operation: string;
              parameters: Record<string, JSONType>;
              predicate_type: string;
              provider: { id: string; name: string; version: string | null };
              raw_result: JSONType;
              schema_version: 2;
              subject:
                  | {
                      architecture: "x86"
                      | "x86_64"
                      | "arm"
                      | "arm64"
                      | null;
                      digest: { sha256: string };
                      format:
                          | "hopper"
                          | "mach-o"
                          | "elf"
                          | "pe"
                          | "zip"
                          | "ipa"
                          | "apk"
                          | "asar"
                          | "dmg"
                          | "pkg"
                          | "plist"
                          | "javascript"
                          | "source-map"
                          | "unknown"
                          | "file"
                          | "directory"
                          | "mach-o-universal"
                          | "javascript-bundle"
                          | "entitlements";
                      local_path: string;
                      name: string;
                  }
                  | null;
          }
          | undefined

    • Return a deterministic snapshot without clearing session evidence.

      Returns {
          artifacts: {
              architecture: "x86" | "x86_64" | "arm" | "arm64" | null;
              digest: { sha256: string };
              format:
                  | "hopper"
                  | "mach-o"
                  | "elf"
                  | "pe"
                  | "zip"
                  | "ipa"
                  | "apk"
                  | "asar"
                  | "dmg"
                  | "pkg"
                  | "plist"
                  | "javascript"
                  | "source-map"
                  | "unknown"
                  | "file"
                  | "directory"
                  | "mach-o-universal"
                  | "javascript-bundle"
                  | "entitlements";
          }[];
          bundle_version: 2;
          captures: { evidence_id: string; predicate_type: string }[];
          environments: {
              architecture: string;
              id: string;
              isolation: "process" | "none" | "container" | "virtual-machine";
              platform: string;
          }[];
          providers: { id: string; name: string; version: string
          | null }[];
          records: {
              authority:
                  | "shipped-artifact"
                  | "controlled-replay"
                  | "historical-reference"
                  | "external-service"
                  | "analyst-inference";
              confidence: "observed"
              | "derived"
              | "inferred";
              environment:
                  | {
                      architecture: string;
                      id: string;
                      isolation: "process"
                      | "none"
                      | "container"
                      | "virtual-machine";
                      platform: string;
                  }
                  | null;
              evidence_id: string;
              evidence_links: string[];
              limitations: string[];
              locations: (
                  | { address: string; kind: "address" }
                  | { end: string; kind: "address-range"; start: string }
                  | { kind: "artifact-path"; path: string }
                  | { kind: "file-offset"; offset: number }
                  | { end: number; kind: "file-offset-range"; start: number }
              )[];
              normalized_result: JSONType;
              operation: string;
              parameters: Record<string, JSONType>;
              predicate_type: string;
              provider: { id: string; name: string; version: string | null };
              raw_result: JSONType;
              schema_version: 2;
              subject:
                  | {
                      architecture: "x86"
                      | "x86_64"
                      | "arm"
                      | "arm64"
                      | null;
                      digest: { sha256: string };
                      format:
                          | "hopper"
                          | "mach-o"
                          | "elf"
                          | "pe"
                          | "zip"
                          | "ipa"
                          | "apk"
                          | "asar"
                          | "dmg"
                          | "pkg"
                          | "plist"
                          | "javascript"
                          | "source-map"
                          | "unknown"
                          | "file"
                          | "directory"
                          | "mach-o-universal"
                          | "javascript-bundle"
                          | "entitlements";
                      local_path: string;
                      name: string;
                  }
                  | null;
          }[];
          scenarios: {
              authority: "controlled-replay";
              evidence_id: string;
              operation: string;
          }[];
          unknowns: {
              contradicting_evidence_ids: string[];
              domain: string;
              mutation_evidence_ids: string[];
              previous_revision_digest: string
              | null;
              question: string;
              recommended_probes: { operation: string; rationale: string }[];
              registry_version: 1;
              relationships: {
                  type: "depends-on" | "related-to" | "contradicts";
                  unknown_id: string;
              }[];
              required_authority: | "shipped-artifact"
              | "controlled-replay"
              | "historical-reference"
              | "external-service"
              | "analyst-inference"
              | null;
              required_confidence: "observed"
              | "derived"
              | "inferred";
              required_environment:
                  | {
                      architecture: string
                      | null;
                      id: string | null;
                      isolation: "process" | "none" | "container" | "virtual-machine" | null;
                      platform: string | null;
                  }
                  | null;
              resolution: | {
                  disposition: "verified";
                  evidence_ids: string[];
                  rationale: string;
              }
              | {
                  disposition: "withdrawn"
                  | "out-of-scope";
                  evidence_ids: string[];
                  rationale: string;
              }
              | null;
              revision: number;
              revision_digest: string;
              scope_digest: string
              | null;
              severity: "low" | "medium" | "high" | "critical";
              status: "open" | "investigating" | "blocked" | "contradicted" | "resolved";
              supporting_evidence_ids: string[];
              unknown_id: string;
          }[];
      }

    • Query stable current residual-unknown heads.

      Parameters

      • filters: {
            domain?: string;
            severity?: "low" | "medium" | "high" | "critical";
            status?: "open" | "investigating" | "blocked" | "contradicted" | "resolved";
        } = {}

      Returns {
          contradicting_evidence_ids: string[];
          domain: string;
          mutation_evidence_ids: string[];
          previous_revision_digest: string | null;
          question: string;
          recommended_probes: { operation: string; rationale: string }[];
          registry_version: 1;
          relationships: {
              type: "depends-on" | "related-to" | "contradicts";
              unknown_id: string;
          }[];
          required_authority: | "shipped-artifact"
          | "controlled-replay"
          | "historical-reference"
          | "external-service"
          | "analyst-inference"
          | null;
          required_confidence: "observed"
          | "derived"
          | "inferred";
          required_environment:
              | {
                  architecture: string
                  | null;
                  id: string | null;
                  isolation: "process" | "none" | "container" | "virtual-machine" | null;
                  platform: string | null;
              }
              | null;
          resolution: | {
              disposition: "verified";
              evidence_ids: string[];
              rationale: string;
          }
          | {
              disposition: "withdrawn"
              | "out-of-scope";
              evidence_ids: string[];
              rationale: string;
          }
          | null;
          revision: number;
          revision_digest: string;
          scope_digest: string
          | null;
          severity: "low" | "medium" | "high" | "critical";
          status: "open" | "investigating" | "blocked" | "contradicted" | "resolved";
          supporting_evidence_ids: string[];
          unknown_id: string;
      }[]

    • Open or switch targets after draining calls against the current target. Returns the switch failure even if best-effort restoration also fails.

      Parameters

      • path: string
      • options: {
            signal?: AbortSignal;
            targetKind?: "executable" | "database" | "archive" | "artifact";
        } = {}

      Returns Promise<Result<BinaryTarget, AnalysisError>>

    • Add one successful public observation to the session ledger.

      Parameters

      • evidence: {
            authority:
                | "shipped-artifact"
                | "controlled-replay"
                | "historical-reference"
                | "external-service"
                | "analyst-inference";
            confidence: "observed"
            | "derived"
            | "inferred";
            environment:
                | {
                    architecture: string;
                    id: string;
                    isolation: "process"
                    | "none"
                    | "container"
                    | "virtual-machine";
                    platform: string;
                }
                | null;
            evidence_id: string;
            evidence_links: string[];
            limitations: string[];
            locations: (
                | { address: string; kind: "address" }
                | { end: string; kind: "address-range"; start: string }
                | { kind: "artifact-path"; path: string }
                | { kind: "file-offset"; offset: number }
                | { end: number; kind: "file-offset-range"; start: number }
            )[];
            normalized_result: JSONType;
            operation: string;
            parameters: Record<string, JSONType>;
            predicate_type: string;
            provider: { id: string; name: string; version: string | null };
            raw_result: JSONType;
            schema_version: 2;
            subject:
                | {
                    architecture: "x86"
                    | "x86_64"
                    | "arm"
                    | "arm64"
                    | null;
                    digest: { sha256: string };
                    format:
                        | "hopper"
                        | "mach-o"
                        | "elf"
                        | "pe"
                        | "zip"
                        | "ipa"
                        | "apk"
                        | "asar"
                        | "dmg"
                        | "pkg"
                        | "plist"
                        | "javascript"
                        | "source-map"
                        | "unknown"
                        | "file"
                        | "directory"
                        | "mach-o-universal"
                        | "javascript-bundle"
                        | "entitlements";
                    local_path: string;
                    name: string;
                }
                | null;
        }

      Returns Result<"added" | "duplicate", EvidenceIntegrityError | EvidenceLimitError>

    • Atomically record derived Evidence and its approved residual unknown.

      Parameters

      • evidence: {
            authority:
                | "shipped-artifact"
                | "controlled-replay"
                | "historical-reference"
                | "external-service"
                | "analyst-inference";
            confidence: "observed"
            | "derived"
            | "inferred";
            environment:
                | {
                    architecture: string;
                    id: string;
                    isolation: "process"
                    | "none"
                    | "container"
                    | "virtual-machine";
                    platform: string;
                }
                | null;
            evidence_id: string;
            evidence_links: string[];
            limitations: string[];
            locations: (
                | { address: string; kind: "address" }
                | { end: string; kind: "address-range"; start: string }
                | { kind: "artifact-path"; path: string }
                | { kind: "file-offset"; offset: number }
                | { end: number; kind: "file-offset-range"; start: number }
            )[];
            normalized_result: JSONType;
            operation: string;
            parameters: Record<string, JSONType>;
            predicate_type: string;
            provider: { id: string; name: string; version: string | null };
            raw_result: JSONType;
            schema_version: 2;
            subject:
                | {
                    architecture: "x86"
                    | "x86_64"
                    | "arm"
                    | "arm64"
                    | null;
                    digest: { sha256: string };
                    format:
                        | "hopper"
                        | "mach-o"
                        | "elf"
                        | "pe"
                        | "zip"
                        | "ipa"
                        | "apk"
                        | "asar"
                        | "dmg"
                        | "pkg"
                        | "plist"
                        | "javascript"
                        | "source-map"
                        | "unknown"
                        | "file"
                        | "directory"
                        | "mach-o-universal"
                        | "javascript-bundle"
                        | "entitlements";
                    local_path: string;
                    name: string;
                }
                | null;
        }
      • input: {
            approved: true;
            contradicting_evidence_ids: string[];
            domain: string;
            question: string;
            recommended_probes: { operation: string; rationale: string }[];
            relationships: {
                type: "depends-on" | "related-to" | "contradicts";
                unknown_id: string;
            }[];
            required_authority: | "shipped-artifact"
            | "controlled-replay"
            | "historical-reference"
            | "external-service"
            | "analyst-inference"
            | null;
            required_confidence: "observed"
            | "derived"
            | "inferred";
            required_environment:
                | {
                    architecture: string
                    | null;
                    id: string | null;
                    isolation: "process" | "none" | "container" | "virtual-machine" | null;
                    platform: string | null;
                }
                | null;
            severity: "low"
            | "medium"
            | "high"
            | "critical";
            supporting_evidence_ids: string[];
        }

      Returns Result<
          | {
              contradicting_evidence_ids: string[];
              domain: string;
              mutation_evidence_ids: string[];
              previous_revision_digest: string
              | null;
              question: string;
              recommended_probes: { operation: string; rationale: string }[];
              registry_version: 1;
              relationships: {
                  type: "depends-on" | "related-to" | "contradicts";
                  unknown_id: string;
              }[];
              required_authority: | "shipped-artifact"
              | "controlled-replay"
              | "historical-reference"
              | "external-service"
              | "analyst-inference"
              | null;
              required_confidence: "observed"
              | "derived"
              | "inferred";
              required_environment:
                  | {
                      architecture: string
                      | null;
                      id: string | null;
                      isolation: "process" | "none" | "container" | "virtual-machine" | null;
                      platform: string | null;
                  }
                  | null;
              resolution: | {
                  disposition: "verified";
                  evidence_ids: string[];
                  rationale: string;
              }
              | {
                  disposition: "withdrawn"
                  | "out-of-scope";
                  evidence_ids: string[];
                  rationale: string;
              }
              | null;
              revision: number;
              revision_digest: string;
              scope_digest: string
              | null;
              severity: "low" | "medium" | "high" | "critical";
              status: "open" | "investigating" | "blocked" | "contradicted" | "resolved";
              supporting_evidence_ids: string[];
              unknown_id: string;
          }
          | null,
          AnalysisError,
      >

    • Create an approved residual unknown and immutable mutation evidence.

      Parameters

      • input: {
            approved: true;
            contradicting_evidence_ids: string[];
            domain: string;
            question: string;
            recommended_probes: { operation: string; rationale: string }[];
            relationships: {
                type: "depends-on" | "related-to" | "contradicts";
                unknown_id: string;
            }[];
            required_authority: | "shipped-artifact"
            | "controlled-replay"
            | "historical-reference"
            | "external-service"
            | "analyst-inference"
            | null;
            required_confidence: "observed"
            | "derived"
            | "inferred";
            required_environment:
                | {
                    architecture: string
                    | null;
                    id: string | null;
                    isolation: "process" | "none" | "container" | "virtual-machine" | null;
                    platform: string | null;
                }
                | null;
            severity: "low"
            | "medium"
            | "high"
            | "critical";
            supporting_evidence_ids: string[];
        }

      Returns Result<
          {
              contradicting_evidence_ids: string[];
              domain: string;
              mutation_evidence_ids: string[];
              previous_revision_digest: string
              | null;
              question: string;
              recommended_probes: { operation: string; rationale: string }[];
              registry_version: 1;
              relationships: {
                  type: "depends-on" | "related-to" | "contradicts";
                  unknown_id: string;
              }[];
              required_authority: | "shipped-artifact"
              | "controlled-replay"
              | "historical-reference"
              | "external-service"
              | "analyst-inference"
              | null;
              required_confidence: "observed"
              | "derived"
              | "inferred";
              required_environment:
                  | {
                      architecture: string
                      | null;
                      id: string | null;
                      isolation: "process" | "none" | "container" | "virtual-machine" | null;
                      platform: string | null;
                  }
                  | null;
              resolution: | {
                  disposition: "verified";
                  evidence_ids: string[];
                  rationale: string;
              }
              | {
                  disposition: "withdrawn"
                  | "out-of-scope";
                  evidence_ids: string[];
                  rationale: string;
              }
              | null;
              revision: number;
              revision_digest: string;
              scope_digest: string
              | null;
              severity: "low" | "medium" | "high" | "critical";
              status: "open" | "investigating" | "blocked" | "contradicted" | "resolved";
              supporting_evidence_ids: string[];
              unknown_id: string;
          },
          AnalysisError,
      >

    • Update one unknown using compare-and-swap revision semantics.

      Parameters

      • input: {
            approved: true;
            contradicting_evidence_ids: string[];
            expected_revision: number;
            recommended_probes: { operation: string; rationale: string }[];
            relationships: {
                type: "depends-on" | "related-to" | "contradicts";
                unknown_id: string;
            }[];
            required_authority: | "shipped-artifact"
            | "controlled-replay"
            | "historical-reference"
            | "external-service"
            | "analyst-inference"
            | null;
            required_confidence: "observed"
            | "derived"
            | "inferred";
            required_environment:
                | {
                    architecture: string
                    | null;
                    id: string | null;
                    isolation: "process" | "none" | "container" | "virtual-machine" | null;
                    platform: string | null;
                }
                | null;
            resolution: | {
                disposition: "verified";
                evidence_ids: string[];
                rationale: string;
            }
            | {
                disposition: "withdrawn"
                | "out-of-scope";
                evidence_ids: string[];
                rationale: string;
            }
            | null;
            severity: "low"
            | "medium"
            | "high"
            | "critical";
            status: "open" | "investigating" | "blocked" | "contradicted" | "resolved";
            supporting_evidence_ids: string[];
            unknown_id: string;
        }

      Returns Result<
          {
              contradicting_evidence_ids: string[];
              domain: string;
              mutation_evidence_ids: string[];
              previous_revision_digest: string
              | null;
              question: string;
              recommended_probes: { operation: string; rationale: string }[];
              registry_version: 1;
              relationships: {
                  type: "depends-on" | "related-to" | "contradicts";
                  unknown_id: string;
              }[];
              required_authority: | "shipped-artifact"
              | "controlled-replay"
              | "historical-reference"
              | "external-service"
              | "analyst-inference"
              | null;
              required_confidence: "observed"
              | "derived"
              | "inferred";
              required_environment:
                  | {
                      architecture: string
                      | null;
                      id: string | null;
                      isolation: "process" | "none" | "container" | "virtual-machine" | null;
                      platform: string | null;
                  }
                  | null;
              resolution: | {
                  disposition: "verified";
                  evidence_ids: string[];
                  rationale: string;
              }
              | {
                  disposition: "withdrawn"
                  | "out-of-scope";
                  evidence_ids: string[];
                  rationale: string;
              }
              | null;
              revision: number;
              revision_digest: string;
              scope_digest: string
              | null;
              severity: "low" | "medium" | "high" | "critical";
              status: "open" | "investigating" | "blocked" | "contradicted" | "resolved";
              supporting_evidence_ids: string[];
              unknown_id: string;
          },
          AnalysisError,
      >

    • Check whether current head is a bundle-valid resolved state.

      Parameters

      • unknownId: string

      Returns Result<
          {
              truthVerified: boolean;
              unknown: {
                  contradicting_evidence_ids: string[];
                  domain: string;
                  mutation_evidence_ids: string[];
                  previous_revision_digest: string
                  | null;
                  question: string;
                  recommended_probes: { operation: string; rationale: string }[];
                  registry_version: 1;
                  relationships: {
                      type: "depends-on" | "related-to" | "contradicts";
                      unknown_id: string;
                  }[];
                  required_authority: | "shipped-artifact"
                  | "controlled-replay"
                  | "historical-reference"
                  | "external-service"
                  | "analyst-inference"
                  | null;
                  required_confidence: "observed"
                  | "derived"
                  | "inferred";
                  required_environment:
                      | {
                          architecture: string
                          | null;
                          id: string | null;
                          isolation: "process" | "none" | "container" | "virtual-machine" | null;
                          platform: string | null;
                      }
                      | null;
                  resolution: | {
                      disposition: "verified";
                      evidence_ids: string[];
                      rationale: string;
                  }
                  | {
                      disposition: "withdrawn"
                      | "out-of-scope";
                      evidence_ids: string[];
                      rationale: string;
                  }
                  | null;
                  revision: number;
                  revision_digest: string;
                  scope_digest: string
                  | null;
                  severity: "low" | "medium" | "high" | "critical";
                  status:
                      | "open"
                      | "investigating"
                      | "blocked"
                      | "contradicted"
                      | "resolved";
                  supporting_evidence_ids: string[];
                  unknown_id: string;
              };
              valid: boolean;
          },
          UnknownRegistryError,
      >