mirror of
https://github.com/morluto/rea.git
synced 2026-10-31 20:06:14 +00:00
Summarize saved Wireshark4.x captures with enforced native resource limits, serialized admission, stable snapshot verification and retained fact/text pages. Preserve complete inventories within resource budgets and source uncertainty; report cleanup failure with partial Evidence and retained ownership. Verified six recorded corpora /13026 packets with independent Scapy/Python oracles, real CLI/MCP/schema parity,60 SNI names,132 DNS addresses and1000 URIs. Real TShark CI now exercises summary/paging. Actual Windows/Bun Wireshark remains unverified; macOS capture requires a separate enforceable-bound decision. Co-authored-by: 3QL <85309073+3QL@users.noreply.github.com> Co-authored-by: N0zoM1z0 <161784452+N0zoM1z0@users.noreply.github.com>
69 lines
1.9 KiB
TypeScript
69 lines
1.9 KiB
TypeScript
import type { z } from "zod";
|
|
|
|
import type { JsonValue } from "../domain/jsonValue.js";
|
|
import type { ToolEffects } from "./toolEffects.js";
|
|
|
|
/** Caller-visible MCP execution hints. */
|
|
interface ToolAnnotations {
|
|
readonly readOnlyHint: boolean;
|
|
readonly destructiveHint: boolean;
|
|
readonly idempotentHint: boolean;
|
|
readonly openWorldHint: boolean;
|
|
}
|
|
|
|
/** One validated example request for an MCP tool contract. */
|
|
export interface ToolExample {
|
|
readonly title: string;
|
|
readonly input: Readonly<Record<string, JsonValue>>;
|
|
}
|
|
|
|
/** Canonical adapter families responsible for public MCP tools. */
|
|
export const TOOL_KINDS = [
|
|
"official-proxy",
|
|
"enhanced",
|
|
"native-provider",
|
|
"artifact-provider",
|
|
"managed-provider",
|
|
"android-provider",
|
|
"apktool-provider",
|
|
"flutter-provider",
|
|
"jeb-provider",
|
|
"adb-provider",
|
|
"firmware-provider",
|
|
"browser-provider",
|
|
"electron-provider",
|
|
"runtime-provider",
|
|
"pcap-provider",
|
|
"application",
|
|
"session",
|
|
] as const;
|
|
|
|
/** Adapter family responsible for implementing a public MCP tool. */
|
|
export type ToolKind = (typeof TOOL_KINDS)[number];
|
|
|
|
/** Single source of truth for a public MCP tool. */
|
|
export interface ToolContract<
|
|
Name extends string = string,
|
|
InputSchema extends z.ZodType<Readonly<Record<string, unknown>>> = z.ZodType<
|
|
Readonly<Record<string, unknown>>
|
|
>,
|
|
OutputSchema extends z.ZodType<Readonly<Record<string, unknown>>> = z.ZodType<
|
|
Readonly<Record<string, unknown>>
|
|
>,
|
|
> {
|
|
readonly name: Name;
|
|
readonly title: string;
|
|
readonly description: string;
|
|
readonly kind: ToolKind;
|
|
readonly inputSchema: InputSchema;
|
|
readonly outputSchema: OutputSchema;
|
|
readonly effects: ToolEffects;
|
|
readonly annotations: ToolAnnotations;
|
|
/**
|
|
* Results, successful or failed, can contain text that originates from the
|
|
* analysis target. MCP delivery marks such results as untrusted data.
|
|
*/
|
|
readonly returnsTargetContent: boolean;
|
|
readonly examples: readonly ToolExample[];
|
|
}
|