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>
24 lines
741 B
TypeScript
24 lines
741 B
TypeScript
import { expect, it } from "vitest";
|
|
|
|
import { serveCli } from "./cliServeHarness.js";
|
|
|
|
it.each(["inspect-pcap-client", "inspect-pcap-capture"])(
|
|
"%s advertises a schema through the public CLI",
|
|
async (command) => {
|
|
const result = await serveCli([command, "--schema", "--json"]);
|
|
expect(result.exitCode).toBe(0);
|
|
expect(JSON.parse(result.stdout)).toBeTruthy();
|
|
},
|
|
);
|
|
|
|
it("reports missing tools with a capability refusal", async () => {
|
|
const result = await serveCli(
|
|
["inspect-pcap-capture", "/nonexistent/capture.pcap", "--json"],
|
|
{
|
|
REA_TSHARK_COMMAND: "/nonexistent/tshark",
|
|
REA_CAPINFOS_COMMAND: "/nonexistent/capinfos",
|
|
},
|
|
);
|
|
expect(result.stdout).toContain("capability_unavailable");
|
|
});
|