feat(browser): inspect retained aioquic qlog JSON captures
Inspect bounded offline aioquic1.5.0 JSON qlog0.3 and page retained event/transport facts with explicit trace and stream selectors. Preserve producer coordinates, exact numeric lexemes, global pre-selection fact scope and endpoint declaration uncertainty. Verified four real HTTP/3 recordings with an independent interval oracle, public CLI/MCP/schema parity, auth exclusions, source-deletion views and actual decoder heap exhaustion. Unverified producer platforms and qlog-specific lifecycle induction remain documented. Co-authored-by: LuisTaffelli <86675342+LuisTaffelli@users.noreply.github.com> Co-authored-by: N0zoM1z0 <161784452+N0zoM1z0@users.noreply.github.com>
This commit is contained in:
@@ -7,7 +7,10 @@ import { toolContract } from "../contracts/toolContracts.js";
|
||||
import type { Logger } from "pino";
|
||||
import { createEvidenceToolHandler } from "./contractToolHandler.js";
|
||||
import type { WithAdmittedAnalysis } from "./analysisAdmission.js";
|
||||
import { toolRegistrationOptions } from "./toolRegistrationOptions.js";
|
||||
import {
|
||||
toolRegistrationOptions,
|
||||
applicationValidatedInputSchema,
|
||||
} from "./toolRegistrationOptions.js";
|
||||
|
||||
/** Bind selected-view projection to its named contract and session Evidence owner. */
|
||||
export const registerAnalysisViewTool = (
|
||||
@@ -18,6 +21,7 @@ export const registerAnalysisViewTool = (
|
||||
withAdmittedAnalysis?: WithAdmittedAnalysis,
|
||||
): void => {
|
||||
const contract = toolContract("inspect_analysis_view");
|
||||
const registration = toolRegistrationOptions(contract);
|
||||
const handler = createEvidenceToolHandler(
|
||||
server,
|
||||
(input) => Promise.resolve(inspectAnalysisView(input, evidenceById)),
|
||||
@@ -27,7 +31,10 @@ export const registerAnalysisViewTool = (
|
||||
);
|
||||
server.registerTool(
|
||||
contract.name,
|
||||
toolRegistrationOptions(contract),
|
||||
{
|
||||
...registration,
|
||||
inputSchema: applicationValidatedInputSchema(registration.inputSchema),
|
||||
},
|
||||
handler(contract),
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { EvidenceMcpServer } from "./EvidenceMcpServer.js";
|
||||
import type { StandardSchemaWithJSON } from "@modelcontextprotocol/server";
|
||||
import type { EvidenceLookup } from "../application/EvidenceInputResolver.js";
|
||||
import {
|
||||
requireAnalysisViewRetention,
|
||||
@@ -15,7 +14,10 @@ import { toolContract } from "../contracts/toolContracts.js";
|
||||
import type { Logger } from "pino";
|
||||
import type { WithAdmittedAnalysis } from "./analysisAdmission.js";
|
||||
import { createEvidenceToolHandler } from "./contractToolHandler.js";
|
||||
import { toolRegistrationOptions } from "./toolRegistrationOptions.js";
|
||||
import {
|
||||
toolRegistrationOptions,
|
||||
applicationValidatedInputSchema,
|
||||
} from "./toolRegistrationOptions.js";
|
||||
|
||||
/** Bind historical inspection to its named contract and caller-owned Evidence writer. */
|
||||
export const registerWebNetworkCaptureTool = (
|
||||
@@ -31,13 +33,7 @@ export const registerWebNetworkCaptureTool = (
|
||||
// Keep the exact advertised contract; the shared service validates raw input
|
||||
// before effects so caller-declared sensitivity also covers invalid arguments.
|
||||
// SDK pre-validation otherwise emits unprojected issue paths as plain text.
|
||||
const inputSchema: StandardSchemaWithJSON = {
|
||||
"~standard": {
|
||||
...registration.inputSchema["~standard"],
|
||||
vendor: "rea-application",
|
||||
validate: (value: unknown) => ({ value }),
|
||||
},
|
||||
};
|
||||
const inputSchema = applicationValidatedInputSchema(registration.inputSchema);
|
||||
const handler = createEvidenceToolHandler(
|
||||
server,
|
||||
async (rawInput, options) => {
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
import type { ToolContract } from "../contracts/toolContractTypes.js";
|
||||
import type { StandardSchemaWithJSON } from "@modelcontextprotocol/server";
|
||||
import {
|
||||
toolInputSchemaWithMetadata,
|
||||
toolOutputSchemaWithMetadata,
|
||||
} from "../contracts/toolSchemaMetadata.js";
|
||||
|
||||
/** Preserve advertised contracts while the application owns structured input failures. */
|
||||
export const applicationValidatedInputSchema = (
|
||||
schema: StandardSchemaWithJSON,
|
||||
): StandardSchemaWithJSON => ({
|
||||
"~standard": {
|
||||
...schema["~standard"],
|
||||
vendor: "rea-application",
|
||||
validate: (value: unknown) => ({ value }),
|
||||
},
|
||||
});
|
||||
|
||||
/** Project the canonical Zod contracts directly into SDK registration. */
|
||||
export const toolRegistrationOptions = <Contract extends ToolContract>(
|
||||
contract: Contract,
|
||||
|
||||
Reference in New Issue
Block a user