From bdba620af3dff0bcfac837dc89e9d1c445a6dc6d Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Tue, 1 Dec 2026 00:23:37 -0500 Subject: [PATCH] fix(mcp): serve input rules agents need within every client's schema budget (#15393) * test(mcp): check schema parity against the served tools/list Schema parity tests registered contracts on a bare SDK server, so they checked a schema REA never serves and missed the compact presentation's losses (#15310, #15311). - Add servedToolCatalog, which lists every tools/list page from a session server, and use it for parity checks in toolSchemaValidity and advertisedDialect. - Add a catalog-wide test that derives one violating value per constrained canonical field from each contract example and requires the served schema to reject it or the served description to name the rule. Today's gaps are listed by root cause; an entry that stops matching fails the test. - Remove absoluteLocalPathTools.test.ts; the catalog test covers every absolute-path field it checked. Refs #15328 * test(mcp): add a seeded property and visited fields to served parity - Generate string values for every constrained string field with a fixed fast-check seed; the refinement gaps it found (rules in .refine() with no served keyword or guidance) are listed with a violating value each. - Assert the sweep derives violations for root, nested and array absolute-path fields. - Check canonical schema validity against the contract schemas directly instead of a bare SDK server, and drop the served-listing test that validated canonicalInputSchema. - Move the reserved environment key check into the compact handler test, which now requires the served description to name the rule. - testing.md: assert parity against the served tools/list. Refs #15328 * fix(mcp): advertise the absolute-path pattern and dialect-dropped rules absoluteLocalPathStringSchema serialized as two allOf patterns, and the dialect projection kept only the first (NUL-free), so every absolute-path field advertised a schema that accepts relative paths. - absoluteLocalPathStringSchema emits one pattern: the absolute envelope over a NUL-free path. NUL is still refused first with its own message. - mergeAllOf conjoins exactly what it can: bounds keep the tighter value and negated-class patterns become one class. A pattern it cannot conjoin is named in tool guidance instead of dropped silently. - multipleOf, length bounds of 1999 or more and exclusive bounds on non-integers become tool guidance, including on nullable values. - Move the allOf merge into advertisedAllOf.ts. Fixes #15310 Refs #15328 * fix(mcp): keep defaults, scalar rules, examples and field semantics in compact schemas Compact input schemas dropped facts an agent needs for a correct first call: every default, the enums and bounds of reduced root properties, any example for reduced or pruned schemas, and the Frida cross-field rules. Name-keyed fallback descriptions also labelled fields of another type. - Tool guidance names root property defaults in one "Defaults:" sentence. - A reduced schema keeps the enum, const, pattern and bounds of each scalar root property. - A reduced or depth-pruned schema states its smallest canonical example (up to 1,024 bytes), and a pruned schema says nested fields are omitted. - Frida contracts state each cross-field rule once, as the refusal and the root description. - Fallback descriptions apply only to a property of the JSON type they describe; they move to propertyFallbackDescriptions.ts. Refs #15311 Refs #15328 * test(mcp): validate the served schema in three advertisement tests compare_artifacts sources, compare_web_captures inputs and the analyze_javascript_application source selection called a canonical or bare-server schema advertised. They now validate the served listing; canonical rejections stay on the contract parser, and the gaps the reduced form leaves are asserted with a pointer to the parity list. Refs #15328 * test(mcp): check recovery promises on an agent's first wrong calls Calls every served tool with generated wrong arguments on a session with nothing open: an unknown path key, an omitted required field, valid arguments for an active-target tool, a missing file and an unknown id. Every refusal must name only advertised tools, name open_binary for an active-target tool, give no schema remediation to arguments the served schema accepts, and claim retryable only when an identical replay can succeed. A seeded property varies the guessed key and missing path. Known failures are listed by root cause (#15309, #15312, #15323 and the active-target declarations #15350 removes); a new failure or a stale entry fails the sweep. * test(mcp): assert the served schema where tests claimed the advertisement Five tests validated the canonical schema and called it advertised, so they asserted rules the served tools/list does not carry: batch_decompile maxItems, inspect_api_contract format and view, the inspect_dart_aot length and line-terminator rules, extract_artifact uniqueItems, and examples on compare_javascript_export_shapes. Each now validates the served schema and keeps the handler enforcement. A missing rule is pinned as a known gap (in the parity sweep where it can see the field, or beside the test where the contract example leaves it unreachable), so the expectation fails once the rule is served. The parity sweep now also derives maxItems and uniqueItems violations from example arrays; it finds inspect_managed_members type_names uniqueItems. Two value-correct tests are relabelled and check the served schema too. * fix(mcp): fit every advertised input schema under Codex's 5,000-byte compaction threshold Codex compacts any MCP input schema above 5,000 serialized bytes and drops descriptions and nested structure first, so update_analysis_settings reached the model as a list of empty objects with no setting IDs. Lower the advertised input budget from 13 KiB to 5,000 bytes, bound $ref expansion separately so projection and depth pruning are judged on their result, and advertise update_analysis_settings changes as one object whose setting enum lists every ID; the canonical parser still enforces each setting's bounds. Refs #15339 * fix(mcp): address review findings across the served-schema stack Keep the recorded description, or its absence, when the deferred runtime materializes, so discovery and the loaded listing agree. Measure example guidance in UTF-8 bytes once, resolve defaults through each property's own reference scope, keep root names and types when scalar rules alone would overflow the reduced form, and decline joining negated classes that a literal hyphen could turn into a range. Served parity now counts guidance only when one sentence labels the field and states its rule, and counts uniqueItems guidance. That stricter match exposed seven gaps the loose match hid; they join their root causes, and the fixed arrayRules gap is removed. The first-contact sweep keys findings by check, checks a structured next step against the served catalog, and uses the catalog's own MCP settings. * chore(mcp): refresh advertised catalog summaries * fix(paths): keep the NUL path refusal's format reason Moving the NUL check out of the advertised pattern turned its issue into a custom refinement, so tool refusals reported reason invalid_value instead of invalid_format with expected regex. The check now raises the same format issue, and still stops before the absolute-path rule. * fix(mcp): state the optional Frida device choice and match bounds by rule The Frida device rule now says both fields may be omitted for the local device. Served parity matches a numeric bound by its direction, unit and complete value, so another bound on the same field cannot cover it. * test(mcp): stop pinning served-schema omissions in workflow tests Workflow tests asserted that the served schema accepts values runtime refuses, so serving a rule would fail them. They keep the valid-input and runtime-refusal checks; the catalog-wide parity sweep tracks what is served. * test(mcp): count a required field only when guidance requires it A sentence that only mentions a field, or a same-named key under another parent, no longer covers a missing required rule. Guidance must state the requirement about the field's full path, or state a shape listing every required key of the field's parent. * test(mcp): credit a served rejection only to the rule that failed The parity sweep counted any served rejection as coverage, so a probe that also broke another rule (a too-long locale that breaks its pattern) hid a missing bound. Served validation now reports every failing keyword, and a rejection covers a rule only when that rule's served keyword fails. --- docs/development/testing.md | 12 +- docs/reference/mcp-contracts.md | 38 +- .../tools/address_name.json | 6 +- .../tools/address_to_file_offset.json | 6 +- .../tools/analyze_function.json | 6 +- .../tools/analyze_javascript_application.json | 9 +- .../tools/analyze_swift_types.json | 6 +- .../tools/analyze_web_bundle.json | 8 +- .../tools/annotate_native_function.json | 6 +- .../tools/audit_release_exposure.json | 7 +- .../tools/batch_decompile.json | 6 +- .../tools/binary_overview.json | 6 +- .../tools/binary_session.json | 7 +- .../tools/build_call_path.json | 7 +- ...uild_reconstruction_obligation_ledger.json | 6 +- .../tools/capture_adb_screen.json | 5 +- .../tools/capture_browser_scenario.json | 8 +- .../tools/capture_electron_scenario.json | 7 +- .../tools/capture_native_ui_scenario.json | 6 +- .../tools/capture_process_scenario.json | 5 +- .../tools/capture_web_screenshot.json | 6 +- .../tools/check_build_task.json | 11 +- .../tools/close_binary.json | 4 +- .../tools/collect_adb_bugreport.json | 5 +- .../advertised-schemas/tools/comment.json | 6 +- .../tools/compare_application_versions.json | 6 +- .../tools/compare_artifacts.json | 8 +- .../tools/compare_bundles.json | 10 +- .../tools/compare_functions.json | 6 +- .../compare_javascript_export_shapes.json | 6 +- .../tools/compare_managed_members.json | 6 +- .../tools/compare_process_captures.json | 8 +- .../tools/compare_source_to_bundle.json | 6 +- ...compare_static_and_observed_endpoints.json | 5 +- .../tools/compare_wasm_interfaces.json | 6 +- .../tools/compare_web_captures.json | 5 +- .../tools/compare_web_screenshots.json | 5 +- .../tools/correlate_static_and_runtime.json | 5 +- .../tools/current_address.json | 6 +- .../tools/current_document.json | 6 +- .../tools/current_procedure.json | 6 +- .../tools/cutter_command.json | 5 +- .../tools/decode_android_resources.json | 5 +- .../tools/decode_interface_builder.json | 6 +- .../tools/decode_signal_recording.json | 7 +- .../tools/decompile_all.json | 7 +- .../tools/decompile_jeb_item.json | 6 +- .../tools/define_native_data_types.json | 6 +- .../tools/demangle_swift.json | 7 +- .../tools/discover_webmcp_tools.json | 6 +- .../evaluate_reconstruction_coverage.json | 3 +- .../tools/execute_rizin_command.json | 5 +- .../tools/export_build_environment.json | 6 +- .../tools/export_environment_bundle.json | 10 +- .../tools/export_evidence_bundle.json | 4 +- .../tools/export_web_scripts.json | 7 +- .../tools/extract_artifact.json | 7 +- .../tools/extract_firmware.json | 7 +- .../tools/extract_uefi_firmware.json | 5 +- .../tools/find_changed_behavior.json | 6 +- .../tools/find_xrefs_to_name.json | 6 +- .../tools/frida_session_status.json | 5 +- .../advertised-schemas/tools/gdb_console.json | 5 +- .../tools/get_call_graph.json | 6 +- .../tools/get_objc_classes.json | 6 +- .../tools/get_objc_protocols.json | 6 +- .../tools/goto_address.json | 6 +- .../tools/guided_workflows.json | 2 +- .../tools/identify_flutter_build.json | 5 +- .../tools/import_evidence_bundle.json | 4 +- .../tools/import_managed_reconstruction.json | 5 +- .../tools/inline_comment.json | 6 +- .../tools/inspect_adb_client.json | 6 +- .../tools/inspect_adb_device.json | 5 +- .../tools/inspect_adb_display.json | 5 +- .../tools/inspect_adb_package.json | 5 +- .../tools/inspect_adb_window.json | 5 +- .../tools/inspect_analysis_settings.json | 2 +- .../tools/inspect_analysis_view.json | 6 +- .../tools/inspect_android_class.json | 7 +- .../tools/inspect_android_jni_bindings.json | 5 +- .../tools/inspect_android_method.json | 7 +- .../tools/inspect_android_package.json | 5 +- .../tools/inspect_api_contract.json | 9 +- .../tools/inspect_apk_signature.json | 7 +- .../tools/inspect_apktool_client.json | 6 +- .../tools/inspect_apple_ips.json | 7 +- .../tools/inspect_artifact.json | 7 +- .../tools/inspect_asset_catalog.json | 6 +- .../tools/inspect_binary_hardening.json | 7 +- .../tools/inspect_binary_layout.json | 7 +- .../tools/inspect_byte_entropy.json | 7 +- .../tools/inspect_dart_aot.json | 5 +- .../tools/inspect_deb_package.json | 7 +- .../tools/inspect_desktop_application.json | 7 +- .../tools/inspect_devicetree.json | 7 +- .../tools/inspect_dwarf_units.json | 7 +- .../tools/inspect_electron_fuses.json | 7 +- .../tools/inspect_electron_page.json | 6 +- .../tools/inspect_elf_debug_link.json | 7 +- .../tools/inspect_elf_dependencies.json | 7 +- .../tools/inspect_elf_notes.json | 7 +- .../tools/inspect_elf_unwind_ranges.json | 7 +- .../tools/inspect_erlang_beam.json | 7 +- .../tools/inspect_esp_nvs.json | 7 +- .../tools/inspect_evm_interface.json | 7 +- .../tools/inspect_evtx_archive.json | 7 +- .../tools/inspect_firmware_regions.json | 7 +- .../tools/inspect_firmware_vector_table.json | 10 +- .../tools/inspect_go_binary.json | 7 +- .../tools/inspect_gpu_code_objects.json | 10 +- .../tools/inspect_il2cpp_metadata.json | 7 +- .../tools/inspect_jeb_client.json | 6 +- .../tools/inspect_kernel_build_config.json | 10 +- .../tools/inspect_kernel_module.json | 7 +- .../tools/inspect_keyed_archive.json | 5 +- .../tools/inspect_labview_artifact.json | 7 +- .../tools/inspect_macho.json | 6 +- .../tools/inspect_macho_function_starts.json | 7 +- .../tools/inspect_managed_artifact.json | 7 +- .../tools/inspect_managed_members.json | 7 +- .../inspect_managed_native_boundaries.json | 7 +- .../tools/inspect_maven_gradle_metadata.json | 7 +- .../tools/inspect_model_artifact.json | 7 +- .../tools/inspect_native_api.json | 6 +- .../tools/inspect_native_data_type.json | 6 +- .../inspect_native_dispatch_metadata.json | 6 +- .../tools/inspect_native_exports.json | 7 +- .../tools/inspect_native_initializers.json | 7 +- .../tools/inspect_native_instruction.json | 6 +- .../tools/inspect_native_load_image.json | 6 +- .../tools/inspect_ntfs_journal.json | 7 +- .../tools/inspect_nuget_nupkg.json | 7 +- .../tools/inspect_oci_image_layout.json | 7 +- .../tools/inspect_packet_capture.json | 7 +- .../tools/inspect_packet_fields.json | 6 +- .../tools/inspect_pcap_capture.json | 7 +- .../tools/inspect_pcap_client.json | 6 +- .../tools/inspect_pe_certificates.json | 7 +- .../tools/inspect_pe_imports.json | 7 +- .../tools/inspect_pe_load_config.json | 7 +- .../tools/inspect_pe_overlay.json | 7 +- .../tools/inspect_pe_resources.json | 7 +- .../tools/inspect_pe_unwind_ranges.json | 7 +- .../tools/inspect_playwright_trace.json | 9 +- .../tools/inspect_plist.json | 5 +- .../tools/inspect_python_pyc.json | 7 +- .../tools/inspect_recorded_crash.json | 7 +- .../tools/inspect_rust_binary.json | 7 +- .../tools/inspect_signal_decoders.json | 5 +- .../tools/inspect_signature.json | 6 +- .../tools/inspect_sqlite_database.json | 7 +- .../tools/inspect_uefi_firmware.json | 5 +- .../tools/inspect_uefi_nvram.json | 5 +- .../tools/inspect_v8_code_cache.json | 7 +- .../tools/inspect_vsix_package.json | 7 +- .../tools/inspect_wasm_artifact.json | 7 +- .../tools/inspect_web_event_listeners.json | 6 +- .../tools/inspect_web_network_capture.json | 7 +- .../tools/inspect_web_page.json | 6 +- .../tools/inspect_windows_shortcut.json | 7 +- .../tools/inspect_with_objdump.json | 5 +- .../tools/inspect_yara_matches.json | 7 +- .../tools/install_adb_package.json | 5 +- .../tools/instrument_with_frida.json | 7 +- .../tools/list_adb_devices.json | 6 +- .../tools/list_adb_directory.json | 5 +- .../tools/list_adb_features.json | 5 +- .../tools/list_adb_packages.json | 5 +- .../tools/list_adb_processes.json | 5 +- .../tools/list_adb_services.json | 5 +- .../tools/list_architectures.json | 6 +- .../tools/list_bookmarks.json | 6 +- .../tools/list_browser_targets.json | 6 +- .../tools/list_documents.json | 6 +- .../tools/list_electron_targets.json | 6 +- .../list_javascript_runtime_targets.json | 6 +- .../tools/list_jeb_units.json | 6 +- .../advertised-schemas/tools/list_names.json | 6 +- .../tools/list_procedures.json | 6 +- .../tools/list_segments.json | 6 +- .../tools/list_strings.json | 6 +- .../tools/load_frida_script.json | 11 +- .../tools/match_native_functions.json | 6 +- .../tools/measure_build_task.json | 7 +- .../tools/next_address.json | 6 +- .../tools/observe_javascript_runtime.json | 6 +- .../tools/observe_native_calls.json | 7 +- .../tools/observe_native_ui.json | 6 +- .../tools/observe_web_execution.json | 6 +- .../tools/observe_web_session.json | 6 +- .../advertised-schemas/tools/open_binary.json | 4 +- .../tools/open_bundle_resources.json | 4 +- .../tools/open_jeb_project.json | 5 +- .../tools/prev_address.json | 6 +- .../tools/procedure_address.json | 6 +- .../tools/procedure_assembly.json | 6 +- .../tools/procedure_callees.json | 6 +- .../tools/procedure_callers.json | 6 +- .../tools/procedure_info.json | 6 +- .../tools/procedure_pseudo_code.json | 6 +- .../tools/procedure_references.json | 6 +- .../project_android_application_graph.json | 6 +- .../project_apple_application_graph.json | 6 +- .../project_harmony_application_graph.json | 6 +- .../project_managed_application_graph.json | 6 +- .../tools/pull_adb_file.json | 5 +- .../tools/pull_adb_package.json | 5 +- .../tools/push_adb_file.json | 5 +- .../tools/read_adb_logcat.json | 5 +- .../tools/read_adb_setting.json | 5 +- .../advertised-schemas/tools/read_bytes.json | 6 +- .../tools/read_function_instructions.json | 6 +- .../tools/reconcile_javascript_runtime.json | 6 +- .../tools/recover_javascript_sources.json | 7 +- .../tools/reset_investigation.json | 4 +- .../tools/resolve_adb_packages.json | 5 +- .../tools/resolve_containing_procedure.json | 6 +- .../tools/resolve_native_call_targets.json | 6 +- .../tools/rizin_debug_command.json | 5 +- .../tools/search_android_classes.json | 5 +- .../tools/search_bytes.json | 6 +- .../tools/search_guidance.json | 2 +- .../tools/search_procedures.json | 6 +- .../tools/search_strings.json | 6 +- .../tools/set_address_name.json | 6 +- .../tools/set_addresses_names.json | 6 +- .../tools/set_bookmark.json | 6 +- .../advertised-schemas/tools/set_comment.json | 6 +- .../tools/set_inline_comment.json | 6 +- .../tools/start_adb_activity.json | 5 +- .../tools/start_adb_app.json | 5 +- .../tools/start_build_computer.json | 7 +- .../tools/start_gdb_session.json | 4 +- .../tools/start_rizin_debug_session.json | 4 +- .../tools/stop_adb_app.json | 5 +- .../tools/stop_build_capture.json | 5 +- .../tools/trace_android_references.json | 5 +- .../tools/trace_application_feature.json | 8 +- .../tools/trace_call_path.json | 6 +- .../tools/trace_dylib_resolution.json | 5 +- .../tools/trace_feature.json | 6 +- .../tools/trace_javascript_semantics.json | 8 +- .../tools/trace_native_ui_action.json | 6 +- .../tools/trace_native_values.json | 6 +- .../tools/trace_web_module_imports.json | 7 +- .../tools/trace_web_source_location.json | 7 +- .../tools/uninstall_adb_package.json | 5 +- .../tools/unset_bookmark.json | 6 +- .../tools/update_analysis_settings.json | 4 +- .../verify_managed_native_boundaries.json | 6 +- .../tools/verify_reconstruction.json | 6 +- .../advertised-schemas/tools/xrefs.json | 6 +- src/contracts/advertisedAllOf.ts | 139 +++ src/contracts/advertisedDialect.ts | 13 +- .../advertisedDialectProjection.test.ts | 49 +- src/contracts/advertisedDialectProjection.ts | 139 +-- src/contracts/analysisSettingsContracts.ts | 35 +- src/contracts/compactInputSchema.test.ts | 84 +- src/contracts/compactInputSchema.ts | 94 +- src/contracts/compactJsonSchema.ts | 85 +- src/contracts/fridaToolContracts.ts | 26 +- src/contracts/inputSchemaPresentation.ts | 15 +- src/contracts/propertyFallbackDescriptions.ts | 204 +++++ src/contracts/toolSchemaMetadata.ts | 78 +- src/domain/localPath.ts | 63 +- src/server/DeferredEvidenceMcpServer.ts | 13 +- .../applications/graphqlContract.test.ts | 23 +- .../artifactExtractionSelection.test.ts | 13 +- .../mcp/absoluteLocalPathSchema.test.ts | 68 -- .../mcp/absoluteLocalPathTools.test.ts | 183 ---- tests/boundary/mcp/advertisedDialect.test.ts | 34 +- tests/boundary/mcp/agentFirstContact.test.ts | 479 ++++++++++ .../mcp/applicationExportShapeMcp.test.ts | 10 +- .../artifactComparisonSourceSchema.test.ts | 168 ++-- .../mcp/browserComparisonInput.test.ts | 15 +- .../mcp/compactInputSchemaMcp.test.ts | 74 +- .../enhancedTools.callPathsAndBatches.test.ts | 21 +- tests/boundary/mcp/evmInterfaceMcp.test.ts | 6 +- tests/boundary/mcp/flutterMcp.test.ts | 24 +- .../mcp/javascriptSourceSelection.test.ts | 15 +- .../mcp/nativeMachoSummaryMcp.test.ts | 11 +- tests/boundary/mcp/servedSchemaParity.test.ts | 830 ++++++++++++++++++ tests/boundary/mcp/toolSchemaValidity.test.ts | 151 +--- tests/fixtures/servedToolCatalog.ts | 66 ++ 285 files changed, 3447 insertions(+), 1377 deletions(-) create mode 100644 src/contracts/advertisedAllOf.ts create mode 100644 src/contracts/propertyFallbackDescriptions.ts delete mode 100644 tests/boundary/mcp/absoluteLocalPathTools.test.ts create mode 100644 tests/boundary/mcp/agentFirstContact.test.ts create mode 100644 tests/boundary/mcp/servedSchemaParity.test.ts create mode 100644 tests/fixtures/servedToolCatalog.ts diff --git a/docs/development/testing.md b/docs/development/testing.md index 01be626bb4..eea3e98d5d 100644 --- a/docs/development/testing.md +++ b/docs/development/testing.md @@ -335,9 +335,15 @@ points as `u` does; Python's `$` also matches before a final newline, which only widens. A client compiling without `u` may still reject one astral character where a wildcard, shorthand or negated class must match it (for example `^[\S]$`); `PortablePatternProjection` documents this accepted -limitation. Keep canonical rejection checks separate from the -intentionally reduced compact advertisement, and probe actual client renderers -when changing schema representations. +limitation. Canonical rejection checks stay on the canonical parser, but +parity between the advertisement and runtime is asserted against the served +`tools/list` (`tests/fixtures/servedToolCatalog.ts`), never a contract +registered on a bare SDK server. `servedSchemaParity.test.ts` derives a +violating value for every constrained field of every contract example, plus a +seeded property over generated strings, and requires the served schema to +reject it or the served description to name the rule. Its known gaps are listed +by root cause, and an entry that stops matching fails the test. Probe actual +client renderers when changing schema representations. The grammar rules are not evidence that an engine accepts a pattern. `npm run verify:advertised-schemas` lists tools from the built package's stdio diff --git a/docs/reference/mcp-contracts.md b/docs/reference/mcp-contracts.md index ba362ffb9a..d168a687ae 100644 --- a/docs/reference/mcp-contracts.md +++ b/docs/reference/mcp-contracts.md @@ -2340,10 +2340,16 @@ OpenCode client behavior. Some function-calling providers reject a request while any single tool's `parameters` schema exceeds a literal serialized size cap; Moonshot clients such as kimi-cli have reported failures with the full catalog attached -([#1484](https://github.com/morluto/rea/issues/1484)). REA therefore renders -every advertised input schema within a 13,312-byte budget, measured to sit below -Moonshot's observed cap (community measurements: a 13.7 KB schema is accepted -while a ~15 KB one is rejected). This compact presentation is the only input +([#1484](https://github.com/morluto/rea/issues/1484)), and Codex compacts any +input schema above 5,000 serialized bytes, dropping descriptions and nested +structure first ([#15339](https://github.com/morluto/rea/issues/15339)). REA +therefore renders every advertised input schema within 5,000 bytes, the smaller +of those limits (Moonshot's observed cap lies between an accepted 13.7 KB +schema and a rejected ~15 KB one). A schema that does not fit is advertised in +reduced form: its root properties, their types and guidance, with the rest +stated in the description. `update_analysis_settings` lists every setting ID in +one `enum`; each setting's own bounds are enforced when the call is validated +and are reported by `inspect_analysis_settings`. This compact presentation is the only input advertisement. `REA_MCP_INPUT_SCHEMA_PROFILE` accepts only `compact`; a registration that selects `full` fails at startup with a configuration error naming the setting. Remove the setting, or set it to `compact`. Compact presentation @@ -2373,10 +2379,13 @@ never refused by the advertisement: literals become one `enum`; other literals keep only their type. - `oneOf` becomes `anyOf`, `allOf` members merge into their parent, tuples advertise the union of their positions with their length bounds, and - exclusive numeric bounds become inclusive (exact for integers). + exclusive numeric bounds become inclusive (exact for integers). Merged + bounds keep the tighter value and negated-class patterns conjoin into one + class; a second pattern that cannot be conjoined is named in guidance. - `$schema`, `format`, `default`, `examples`, `title`, `propertyNames`, `additionalProperties` schemas, property-count bounds, conditionals and - length bounds of 1,999 or more are dropped. + length bounds of 1,999 or more are dropped. `multipleOf`, those length + bounds and exclusive bounds on non-integers are stated in guidance. - A nullable value is advertised in the dialect's one nullable form: `anyOf` a typed branch and `{"type": "null"}`, below the root. Type lists such as `["integer", "null"]` are outside the dialect (Gemini's legacy schema @@ -2384,9 +2393,10 @@ never refused by the advertisement: the non-null type would refuse a valid call such as `limit: null`. Guidance never stays inside the compact schema. The root description (input -groups, Evidence-source guidance, the reduced-form notice) and sentences for -dropped cross-field constraints (`dependentRequired`, `uniqueItems`, excluded -values) follow the tool description. Codex strips every description inside a +groups, Evidence-source guidance, the reduced-form notice, cross-field rules a +contract states on its root), sentences for dropped constraints +(`dependentRequired`, `uniqueItems`, excluded values, steps and bounds) and one +`Defaults:` sentence for root property defaults follow the tool description. Codex strips every description inside a schema above 5,000 bytes and Zed drops the root description; neither strips the tool description. @@ -2405,9 +2415,13 @@ JSON Schema and appends input guidance to the tool description: - Schemas whose projected validation structure exceeds the budget or ten levels, or that need a construct the dialect cannot express (an any-value field), are advertised in a reduced form: property names, - reference-resolved types (including union alternatives), first-level - guidance, and the root's required-field constraints, with nested validation - detail elided. The registered canonical schema still rejects malformed calls + reference-resolved types (including union alternatives), the enum, pattern + and bounds of scalar root properties, first-level guidance, and the root's + required-field constraints, with nested validation detail elided. When the + scalar rules alone would not fit, they are left out before any property + name, type or required field. A reduced + schema, or one whose fields past ten levels were pruned, also states its + smallest canonical example of up to 1,024 bytes in guidance. The registered canonical schema still rejects malformed calls before invoking a handler. That rejection can use the MCP SDK's input-validation diagnostic; it does not guarantee the application's typed input error. diff --git a/scripts/verify/advertised-schemas/tools/address_name.json b/scripts/verify/advertised-schemas/tools/address_name.json index fb20c66cfb..2fd0db099d 100644 --- a/scripts/verify/advertised-schemas/tools/address_name.json +++ b/scripts/verify/advertised-schemas/tools/address_name.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "c3e7279c968e665b", - "output compact": "a0ef8b2e69cf9187" + "output compact": "4303053d476037d2" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/address_to_file_offset.json b/scripts/verify/advertised-schemas/tools/address_to_file_offset.json index 95aa9f24d7..6f0b19690b 100644 --- a/scripts/verify/advertised-schemas/tools/address_to_file_offset.json +++ b/scripts/verify/advertised-schemas/tools/address_to_file_offset.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "940657f284593726", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/analyze_function.json b/scripts/verify/advertised-schemas/tools/analyze_function.json index 24392e3233..1705c405fb 100644 --- a/scripts/verify/advertised-schemas/tools/analyze_function.json +++ b/scripts/verify/advertised-schemas/tools/analyze_function.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "02ac81c718b49410", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/analyze_javascript_application.json b/scripts/verify/advertised-schemas/tools/analyze_javascript_application.json index f7f424a9d2..3e5b26170c 100644 --- a/scripts/verify/advertised-schemas/tools/analyze_javascript_application.json +++ b/scripts/verify/advertised-schemas/tools/analyze_javascript_application.json @@ -1,7 +1,10 @@ { "schemas": { - "input compact": "5410f29d6d7195f1", - "output compact": "d2b94d1517ad80ea" + "input compact": "8d6a27ecd53ca71c", + "output compact": "e345f0377ecbe795" }, - "patterns": {} + "patterns": { + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/analyze_swift_types.json b/scripts/verify/advertised-schemas/tools/analyze_swift_types.json index c394a0087f..fb9c0cff30 100644 --- a/scripts/verify/advertised-schemas/tools/analyze_swift_types.json +++ b/scripts/verify/advertised-schemas/tools/analyze_swift_types.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "954672370cc76451", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/analyze_web_bundle.json b/scripts/verify/advertised-schemas/tools/analyze_web_bundle.json index 92c3a7f1a5..ed8daf6eda 100644 --- a/scripts/verify/advertised-schemas/tools/analyze_web_bundle.json +++ b/scripts/verify/advertised-schemas/tools/analyze_web_bundle.json @@ -1,7 +1,9 @@ { "schemas": { - "input compact": "3d7959f5cdca863d", - "output compact": "d2b94d1517ad80ea" + "input compact": "e53a891e79169b55", + "output compact": "e345f0377ecbe795" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/annotate_native_function.json b/scripts/verify/advertised-schemas/tools/annotate_native_function.json index f74de3bbc0..b43fb61f70 100644 --- a/scripts/verify/advertised-schemas/tools/annotate_native_function.json +++ b/scripts/verify/advertised-schemas/tools/annotate_native_function.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "35e71f4fbd7e748e", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/audit_release_exposure.json b/scripts/verify/advertised-schemas/tools/audit_release_exposure.json index 385f54f0a0..9482c99e0b 100644 --- a/scripts/verify/advertised-schemas/tools/audit_release_exposure.json +++ b/scripts/verify/advertised-schemas/tools/audit_release_exposure.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "86bfdb6593ffe879", - "output compact": "fc6c5d5a78a47254" + "input compact": "4558ce76ad5e6416", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/batch_decompile.json b/scripts/verify/advertised-schemas/tools/batch_decompile.json index c304d953d0..5e2a47a26c 100644 --- a/scripts/verify/advertised-schemas/tools/batch_decompile.json +++ b/scripts/verify/advertised-schemas/tools/batch_decompile.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "38d5b1c230543ed8", - "output compact": "d2b94d1517ad80ea" + "output compact": "e345f0377ecbe795" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/binary_overview.json b/scripts/verify/advertised-schemas/tools/binary_overview.json index a79c420e49..ec24e65214 100644 --- a/scripts/verify/advertised-schemas/tools/binary_overview.json +++ b/scripts/verify/advertised-schemas/tools/binary_overview.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "32062bdb9024160d", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/binary_session.json b/scripts/verify/advertised-schemas/tools/binary_session.json index 1c9503ca7c..515202ecdd 100644 --- a/scripts/verify/advertised-schemas/tools/binary_session.json +++ b/scripts/verify/advertised-schemas/tools/binary_session.json @@ -1,9 +1,12 @@ { "schemas": { - "input compact": "ea2ae40d88bad772", + "input compact": "929351d41752e8e6", "output compact": "9cda19dfa1310afa" }, "patterns": { - "input": ["^[0-9a-f]{64}$", "^[^\\x00]*$"] + "input": [ + "^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", + "^[0-9a-f]{64}$" + ] } } diff --git a/scripts/verify/advertised-schemas/tools/build_call_path.json b/scripts/verify/advertised-schemas/tools/build_call_path.json index 13a3ece1f0..30c0b9d714 100644 --- a/scripts/verify/advertised-schemas/tools/build_call_path.json +++ b/scripts/verify/advertised-schemas/tools/build_call_path.json @@ -1,9 +1,12 @@ { "schemas": { "input compact": "c437b17fce61bb4c", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^(?:(?:[\\-.0-9A-Z_a-z~]|%[0-9A-Fa-f]{2})+:)?0[Xx][0-9A-Fa-f]+$"] + "input": [ + "^(?:(?:[\\-.0-9A-Z_a-z~]|%[0-9A-Fa-f]{2})+:)?0[Xx][0-9A-Fa-f]+$" + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/build_reconstruction_obligation_ledger.json b/scripts/verify/advertised-schemas/tools/build_reconstruction_obligation_ledger.json index 078287dd6c..b8f8887c4a 100644 --- a/scripts/verify/advertised-schemas/tools/build_reconstruction_obligation_ledger.json +++ b/scripts/verify/advertised-schemas/tools/build_reconstruction_obligation_ledger.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "a7cd5ce32e774439", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/capture_adb_screen.json b/scripts/verify/advertised-schemas/tools/capture_adb_screen.json index 4912c21837..a6b07716fc 100644 --- a/scripts/verify/advertised-schemas/tools/capture_adb_screen.json +++ b/scripts/verify/advertised-schemas/tools/capture_adb_screen.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "5270421b8c21c650", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00\\x09-\\x0d \"']+$", "^[^\\x00]*$"] + "input": ["^[^\\x00\\x09-\\x0d \"']+$", "^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/capture_browser_scenario.json b/scripts/verify/advertised-schemas/tools/capture_browser_scenario.json index be2a8bddcc..52c693df67 100644 --- a/scripts/verify/advertised-schemas/tools/capture_browser_scenario.json +++ b/scripts/verify/advertised-schemas/tools/capture_browser_scenario.json @@ -1,7 +1,9 @@ { "schemas": { - "input compact": "b6dd5d5a3ec9252c", - "output compact": "d2b94d1517ad80ea" + "input compact": "6eac36a20ddf5387", + "output compact": "e345f0377ecbe795" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/capture_electron_scenario.json b/scripts/verify/advertised-schemas/tools/capture_electron_scenario.json index 0e52982daa..c4abf48f99 100644 --- a/scripts/verify/advertised-schemas/tools/capture_electron_scenario.json +++ b/scripts/verify/advertised-schemas/tools/capture_electron_scenario.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "9d206f6b3abdf4ec", - "output compact": "fc6c5d5a78a47254" + "input compact": "f11b93371673a896", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", "^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/capture_native_ui_scenario.json b/scripts/verify/advertised-schemas/tools/capture_native_ui_scenario.json index e15153dc61..ffa26a4c28 100644 --- a/scripts/verify/advertised-schemas/tools/capture_native_ui_scenario.json +++ b/scripts/verify/advertised-schemas/tools/capture_native_ui_scenario.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "790dbff706736eb5", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/capture_process_scenario.json b/scripts/verify/advertised-schemas/tools/capture_process_scenario.json index 240a67a7d8..3f8e732398 100644 --- a/scripts/verify/advertised-schemas/tools/capture_process_scenario.json +++ b/scripts/verify/advertised-schemas/tools/capture_process_scenario.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "7a8f6b11c2fc74da", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/capture_web_screenshot.json b/scripts/verify/advertised-schemas/tools/capture_web_screenshot.json index d9e464a08a..bc037d04fd 100644 --- a/scripts/verify/advertised-schemas/tools/capture_web_screenshot.json +++ b/scripts/verify/advertised-schemas/tools/capture_web_screenshot.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "7ba00cbe6d75c7d9", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/check_build_task.json b/scripts/verify/advertised-schemas/tools/check_build_task.json index 3f33601877..59313429d8 100644 --- a/scripts/verify/advertised-schemas/tools/check_build_task.json +++ b/scripts/verify/advertised-schemas/tools/check_build_task.json @@ -1,13 +1,16 @@ { "schemas": { - "input compact": "bd3b5802cb788e96", - "output compact": "86cabbcac4bdb308" + "input compact": "0cbe901bd84fa3e6", + "output compact": "54a493ccbed095b9" }, "patterns": { "input": [ + "^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", "^([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-8][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "^[0-9a-z][\\-0-9a-z]{0,63}$", - "^[^\\x00]*$" + "^[0-9a-z][\\-0-9a-z]{0,63}$" + ], + "output": [ + "^([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-8][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" ] } } diff --git a/scripts/verify/advertised-schemas/tools/close_binary.json b/scripts/verify/advertised-schemas/tools/close_binary.json index 67862d7308..ed03550ae0 100644 --- a/scripts/verify/advertised-schemas/tools/close_binary.json +++ b/scripts/verify/advertised-schemas/tools/close_binary.json @@ -1,9 +1,9 @@ { "schemas": { - "input compact": "1650d4dd6dfc3b5e", + "input compact": "c5266fc2afcd79f6", "output compact": "e49c0057adf971d0" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"] } } diff --git a/scripts/verify/advertised-schemas/tools/collect_adb_bugreport.json b/scripts/verify/advertised-schemas/tools/collect_adb_bugreport.json index 4912c21837..a6b07716fc 100644 --- a/scripts/verify/advertised-schemas/tools/collect_adb_bugreport.json +++ b/scripts/verify/advertised-schemas/tools/collect_adb_bugreport.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "5270421b8c21c650", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00\\x09-\\x0d \"']+$", "^[^\\x00]*$"] + "input": ["^[^\\x00\\x09-\\x0d \"']+$", "^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/comment.json b/scripts/verify/advertised-schemas/tools/comment.json index fb20c66cfb..2fd0db099d 100644 --- a/scripts/verify/advertised-schemas/tools/comment.json +++ b/scripts/verify/advertised-schemas/tools/comment.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "c3e7279c968e665b", - "output compact": "a0ef8b2e69cf9187" + "output compact": "4303053d476037d2" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/compare_application_versions.json b/scripts/verify/advertised-schemas/tools/compare_application_versions.json index 34606a0ff7..8d2241c230 100644 --- a/scripts/verify/advertised-schemas/tools/compare_application_versions.json +++ b/scripts/verify/advertised-schemas/tools/compare_application_versions.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "b50e5b8c86b63530", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/compare_artifacts.json b/scripts/verify/advertised-schemas/tools/compare_artifacts.json index 35140b6aaa..ed54e8397b 100644 --- a/scripts/verify/advertised-schemas/tools/compare_artifacts.json +++ b/scripts/verify/advertised-schemas/tools/compare_artifacts.json @@ -1,7 +1,9 @@ { "schemas": { - "input compact": "633f07e1c25fb0e9", - "output compact": "fc6c5d5a78a47254" + "input compact": "50fb1396641da3c9", + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/compare_bundles.json b/scripts/verify/advertised-schemas/tools/compare_bundles.json index 548be00762..38a7da775b 100644 --- a/scripts/verify/advertised-schemas/tools/compare_bundles.json +++ b/scripts/verify/advertised-schemas/tools/compare_bundles.json @@ -1,9 +1,13 @@ { "schemas": { - "input compact": "006beb225fddea97", - "output compact": "fc6c5d5a78a47254" + "input compact": "f56da0ec1a2dfc81", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + "input": [ + "^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", + "^ev_[0-9a-f]{64}$" + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/compare_functions.json b/scripts/verify/advertised-schemas/tools/compare_functions.json index 6f345a4d3e..ba6e9119e9 100644 --- a/scripts/verify/advertised-schemas/tools/compare_functions.json +++ b/scripts/verify/advertised-schemas/tools/compare_functions.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "0310c454b32391ad", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/compare_javascript_export_shapes.json b/scripts/verify/advertised-schemas/tools/compare_javascript_export_shapes.json index 82595143bd..2154994fb9 100644 --- a/scripts/verify/advertised-schemas/tools/compare_javascript_export_shapes.json +++ b/scripts/verify/advertised-schemas/tools/compare_javascript_export_shapes.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "b80a2e664d1fc112", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/compare_managed_members.json b/scripts/verify/advertised-schemas/tools/compare_managed_members.json index 6f345a4d3e..ba6e9119e9 100644 --- a/scripts/verify/advertised-schemas/tools/compare_managed_members.json +++ b/scripts/verify/advertised-schemas/tools/compare_managed_members.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "0310c454b32391ad", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/compare_process_captures.json b/scripts/verify/advertised-schemas/tools/compare_process_captures.json index d45fd17f2c..5dfeb41a74 100644 --- a/scripts/verify/advertised-schemas/tools/compare_process_captures.json +++ b/scripts/verify/advertised-schemas/tools/compare_process_captures.json @@ -1,7 +1,9 @@ { "schemas": { - "input compact": "09de9679075c918d", - "output compact": "fc6c5d5a78a47254" + "input compact": "fe9ebc5ae6291a6f", + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/compare_source_to_bundle.json b/scripts/verify/advertised-schemas/tools/compare_source_to_bundle.json index f1d49ed300..31507ef3d3 100644 --- a/scripts/verify/advertised-schemas/tools/compare_source_to_bundle.json +++ b/scripts/verify/advertised-schemas/tools/compare_source_to_bundle.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "53e35e56039bbec8", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/compare_static_and_observed_endpoints.json b/scripts/verify/advertised-schemas/tools/compare_static_and_observed_endpoints.json index 724fb06f65..bb88dab487 100644 --- a/scripts/verify/advertised-schemas/tools/compare_static_and_observed_endpoints.json +++ b/scripts/verify/advertised-schemas/tools/compare_static_and_observed_endpoints.json @@ -1,12 +1,13 @@ { "schemas": { "input compact": "6643b2605c71f738", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { "input": [ "^observed_endpoint_[0-9a-f]{64}$", "^static_endpoint_[0-9a-f]{64}$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/compare_wasm_interfaces.json b/scripts/verify/advertised-schemas/tools/compare_wasm_interfaces.json index 683a103971..5ec2997f7e 100644 --- a/scripts/verify/advertised-schemas/tools/compare_wasm_interfaces.json +++ b/scripts/verify/advertised-schemas/tools/compare_wasm_interfaces.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "11fa9176d2a73592", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/compare_web_captures.json b/scripts/verify/advertised-schemas/tools/compare_web_captures.json index 21d4dddfd6..09ae4e7824 100644 --- a/scripts/verify/advertised-schemas/tools/compare_web_captures.json +++ b/scripts/verify/advertised-schemas/tools/compare_web_captures.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "0ea9df187d3a9141", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^ev_[0-9a-f]{64}$"] + "input": ["^ev_[0-9a-f]{64}$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/compare_web_screenshots.json b/scripts/verify/advertised-schemas/tools/compare_web_screenshots.json index 0c45d6f6f6..8a483a463e 100644 --- a/scripts/verify/advertised-schemas/tools/compare_web_screenshots.json +++ b/scripts/verify/advertised-schemas/tools/compare_web_screenshots.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "e23c7fd3aa68a1cf", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[0-9a-f]{64}$"] + "input": ["^[0-9a-f]{64}$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/correlate_static_and_runtime.json b/scripts/verify/advertised-schemas/tools/correlate_static_and_runtime.json index 5543d50bdd..fbbeb17569 100644 --- a/scripts/verify/advertised-schemas/tools/correlate_static_and_runtime.json +++ b/scripts/verify/advertised-schemas/tools/correlate_static_and_runtime.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "b0bb060348574b95", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^ev_[0-9a-f]{64}$"] + "input": ["^ev_[0-9a-f]{64}$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/current_address.json b/scripts/verify/advertised-schemas/tools/current_address.json index 9ca3efedf4..358db665a8 100644 --- a/scripts/verify/advertised-schemas/tools/current_address.json +++ b/scripts/verify/advertised-schemas/tools/current_address.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "4df1857d0f25b9b1", - "output compact": "8e073f5fb72b5a75" + "output compact": "eb88868dbb05b21e" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/current_document.json b/scripts/verify/advertised-schemas/tools/current_document.json index 07d62ed8c0..730865bde0 100644 --- a/scripts/verify/advertised-schemas/tools/current_document.json +++ b/scripts/verify/advertised-schemas/tools/current_document.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "32062bdb9024160d", - "output compact": "8e073f5fb72b5a75" + "output compact": "eb88868dbb05b21e" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/current_procedure.json b/scripts/verify/advertised-schemas/tools/current_procedure.json index 9ca3efedf4..358db665a8 100644 --- a/scripts/verify/advertised-schemas/tools/current_procedure.json +++ b/scripts/verify/advertised-schemas/tools/current_procedure.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "4df1857d0f25b9b1", - "output compact": "8e073f5fb72b5a75" + "output compact": "eb88868dbb05b21e" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/cutter_command.json b/scripts/verify/advertised-schemas/tools/cutter_command.json index f7875e5b9b..2534279e81 100644 --- a/scripts/verify/advertised-schemas/tools/cutter_command.json +++ b/scripts/verify/advertised-schemas/tools/cutter_command.json @@ -1,11 +1,12 @@ { "schemas": { "input compact": "f960ef76daeef6ed", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { "input": [ "^([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-8][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/decode_android_resources.json b/scripts/verify/advertised-schemas/tools/decode_android_resources.json index 1bcc8b7aec..6503b209dc 100644 --- a/scripts/verify/advertised-schemas/tools/decode_android_resources.json +++ b/scripts/verify/advertised-schemas/tools/decode_android_resources.json @@ -1,12 +1,13 @@ { "schemas": { "input compact": "03c154678fe7d621", - "output compact": "d2b94d1517ad80ea" + "output compact": "e345f0377ecbe795" }, "patterns": { "input": [ "^(?:[a-z]{2,3}(?:-(?:r?[A-Z]{2}|[0-9]{3}))?|b\\+[a-z]{2,3}(?:\\+[0-9A-Za-z]{2,8})*)$", "^[^\\x00]*$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/decode_interface_builder.json b/scripts/verify/advertised-schemas/tools/decode_interface_builder.json index 651dcab747..24a88a294d 100644 --- a/scripts/verify/advertised-schemas/tools/decode_interface_builder.json +++ b/scripts/verify/advertised-schemas/tools/decode_interface_builder.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "0395893cc47e3a89", - "output compact": "d2b94d1517ad80ea" + "output compact": "e345f0377ecbe795" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/decode_signal_recording.json b/scripts/verify/advertised-schemas/tools/decode_signal_recording.json index a962cb0d0d..64618f294e 100644 --- a/scripts/verify/advertised-schemas/tools/decode_signal_recording.json +++ b/scripts/verify/advertised-schemas/tools/decode_signal_recording.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "15a7a050f212e5de", - "output compact": "fc6c5d5a78a47254" + "input compact": "5d333f2767fc2c42", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", "^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/decompile_all.json b/scripts/verify/advertised-schemas/tools/decompile_all.json index f2f09267cd..2fe257621b 100644 --- a/scripts/verify/advertised-schemas/tools/decompile_all.json +++ b/scripts/verify/advertised-schemas/tools/decompile_all.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "c006fdc2cf6e418a", - "output compact": "fc6c5d5a78a47254" + "input compact": "8cd85399a36720f0", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/decompile_jeb_item.json b/scripts/verify/advertised-schemas/tools/decompile_jeb_item.json index 8f5c137ec5..4ea9a3c709 100644 --- a/scripts/verify/advertised-schemas/tools/decompile_jeb_item.json +++ b/scripts/verify/advertised-schemas/tools/decompile_jeb_item.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "365c0a3f3e7ee733", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/define_native_data_types.json b/scripts/verify/advertised-schemas/tools/define_native_data_types.json index 5912970af0..541f726068 100644 --- a/scripts/verify/advertised-schemas/tools/define_native_data_types.json +++ b/scripts/verify/advertised-schemas/tools/define_native_data_types.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "5cbbfe8ba3778c39", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/demangle_swift.json b/scripts/verify/advertised-schemas/tools/demangle_swift.json index 6406c6d7e3..ba7108e837 100644 --- a/scripts/verify/advertised-schemas/tools/demangle_swift.json +++ b/scripts/verify/advertised-schemas/tools/demangle_swift.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "ce0ed2a63eb8849e", - "output compact": "fc6c5d5a78a47254" + "input compact": "33d7c549bc2d4ed6", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x0a]*$"] + "input": ["^[^\\x00\\x0a]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/discover_webmcp_tools.json b/scripts/verify/advertised-schemas/tools/discover_webmcp_tools.json index b62b7f4721..55b1babe10 100644 --- a/scripts/verify/advertised-schemas/tools/discover_webmcp_tools.json +++ b/scripts/verify/advertised-schemas/tools/discover_webmcp_tools.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "00fbe6b4dfd83953", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/evaluate_reconstruction_coverage.json b/scripts/verify/advertised-schemas/tools/evaluate_reconstruction_coverage.json index ec2c9d53cc..80d5e329b2 100644 --- a/scripts/verify/advertised-schemas/tools/evaluate_reconstruction_coverage.json +++ b/scripts/verify/advertised-schemas/tools/evaluate_reconstruction_coverage.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "4c824f77c8039956", + "input compact": "22a1e4a890bea528", "output compact": "6eb93bf85f43f04d" }, "patterns": { + "input": ["^[A-Za-z][\\x2d-\\x3aA-Z_a-z]{0,199}$"], "output": ["^[A-Za-z][\\x2d-\\x3aA-Z_a-z]{0,199}$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/execute_rizin_command.json b/scripts/verify/advertised-schemas/tools/execute_rizin_command.json index 5432353cd3..2bd47cbc52 100644 --- a/scripts/verify/advertised-schemas/tools/execute_rizin_command.json +++ b/scripts/verify/advertised-schemas/tools/execute_rizin_command.json @@ -1,13 +1,14 @@ { "schemas": { "input compact": "abd06cd2d1a16823", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { "input": [ "^0x[0-9A-Fa-f]{1,16}$", "^[0-9A-Za-z][+\\-.0-9A-Z_a-z]*$", "^[^\\x00]*$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/export_build_environment.json b/scripts/verify/advertised-schemas/tools/export_build_environment.json index 98e5158522..756c6b1f62 100644 --- a/scripts/verify/advertised-schemas/tools/export_build_environment.json +++ b/scripts/verify/advertised-schemas/tools/export_build_environment.json @@ -1,9 +1,13 @@ { "schemas": { - "input compact": "f2e2ecfc4671d550", + "input compact": "fc9281140bcd74b0", "output compact": "c9f69f0d4856f6f4" }, "patterns": { + "input": [ + "^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", + "^([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-8][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + ], "output": [ "^([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-8][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" ] diff --git a/scripts/verify/advertised-schemas/tools/export_environment_bundle.json b/scripts/verify/advertised-schemas/tools/export_environment_bundle.json index 63c49bc34a..654cf1c338 100644 --- a/scripts/verify/advertised-schemas/tools/export_environment_bundle.json +++ b/scripts/verify/advertised-schemas/tools/export_environment_bundle.json @@ -1,9 +1,13 @@ { "schemas": { - "input compact": "61eb02cacceb0fc4", - "output compact": "31f5a06d7bc1ebba" + "input compact": "7013ebe0669738d7", + "output compact": "e2011e0227de7d90" }, "patterns": { - "input": ["^[0-9a-z]+(?:-[0-9a-z]+)*$", "^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + "input": [ + "^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", + "^[0-9a-z]+(?:-[0-9a-z]+)*$", + "^ev_[0-9a-f]{64}$" + ] } } diff --git a/scripts/verify/advertised-schemas/tools/export_evidence_bundle.json b/scripts/verify/advertised-schemas/tools/export_evidence_bundle.json index 5725657614..946bf4c5d2 100644 --- a/scripts/verify/advertised-schemas/tools/export_evidence_bundle.json +++ b/scripts/verify/advertised-schemas/tools/export_evidence_bundle.json @@ -1,9 +1,9 @@ { "schemas": { - "input compact": "fc434da7d0233b71", + "input compact": "58fbb09de0304804", "output compact": "66a3eb6c5dc33577" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"] } } diff --git a/scripts/verify/advertised-schemas/tools/export_web_scripts.json b/scripts/verify/advertised-schemas/tools/export_web_scripts.json index 5d6f249682..7a83b72980 100644 --- a/scripts/verify/advertised-schemas/tools/export_web_scripts.json +++ b/scripts/verify/advertised-schemas/tools/export_web_scripts.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "8ca0e91e236b0d2d", - "output compact": "fc6c5d5a78a47254" + "input compact": "9b37fc91cfb7be34", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/extract_artifact.json b/scripts/verify/advertised-schemas/tools/extract_artifact.json index 89537517a1..dd57d256dc 100644 --- a/scripts/verify/advertised-schemas/tools/extract_artifact.json +++ b/scripts/verify/advertised-schemas/tools/extract_artifact.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "b6abe16831697f1d", - "output compact": "d2b94d1517ad80ea" + "input compact": "62fe74e9ad6561b2", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$", "^occ_[0-9a-f]{64}$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/extract_firmware.json b/scripts/verify/advertised-schemas/tools/extract_firmware.json index c147ec1e42..587f816c7f 100644 --- a/scripts/verify/advertised-schemas/tools/extract_firmware.json +++ b/scripts/verify/advertised-schemas/tools/extract_firmware.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "d106ecd6b92b8dac", - "output compact": "fc6c5d5a78a47254" + "input compact": "fa4a6bf2165b1a4c", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/extract_uefi_firmware.json b/scripts/verify/advertised-schemas/tools/extract_uefi_firmware.json index b77af52c1d..dfed1bea07 100644 --- a/scripts/verify/advertised-schemas/tools/extract_uefi_firmware.json +++ b/scripts/verify/advertised-schemas/tools/extract_uefi_firmware.json @@ -1,12 +1,13 @@ { "schemas": { "input compact": "bd4ced5a290a86f6", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { "input": [ "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", "^[^\\x00]*$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/find_changed_behavior.json b/scripts/verify/advertised-schemas/tools/find_changed_behavior.json index 23e6e015c5..ee775ca675 100644 --- a/scripts/verify/advertised-schemas/tools/find_changed_behavior.json +++ b/scripts/verify/advertised-schemas/tools/find_changed_behavior.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "70913fb64575107e", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/find_xrefs_to_name.json b/scripts/verify/advertised-schemas/tools/find_xrefs_to_name.json index 579a3baa53..64d093e555 100644 --- a/scripts/verify/advertised-schemas/tools/find_xrefs_to_name.json +++ b/scripts/verify/advertised-schemas/tools/find_xrefs_to_name.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "004a9b64dc20a765", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/frida_session_status.json b/scripts/verify/advertised-schemas/tools/frida_session_status.json index fcd3b285cf..93a10cfb8a 100644 --- a/scripts/verify/advertised-schemas/tools/frida_session_status.json +++ b/scripts/verify/advertised-schemas/tools/frida_session_status.json @@ -1,11 +1,12 @@ { "schemas": { "input compact": "31cc6bc09d1bb29d", - "output compact": "d2b94d1517ad80ea" + "output compact": "e345f0377ecbe795" }, "patterns": { "input": [ "^([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-8][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/gdb_console.json b/scripts/verify/advertised-schemas/tools/gdb_console.json index 96afd0d19e..26d0ded6dc 100644 --- a/scripts/verify/advertised-schemas/tools/gdb_console.json +++ b/scripts/verify/advertised-schemas/tools/gdb_console.json @@ -1,11 +1,12 @@ { "schemas": { "input compact": "71d7ad04aa702db9", - "output compact": "d2b94d1517ad80ea" + "output compact": "e345f0377ecbe795" }, "patterns": { "input": [ "^([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-8][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/get_call_graph.json b/scripts/verify/advertised-schemas/tools/get_call_graph.json index d07a00dbb7..4469c9339c 100644 --- a/scripts/verify/advertised-schemas/tools/get_call_graph.json +++ b/scripts/verify/advertised-schemas/tools/get_call_graph.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "d8bc42e72c3d6756", - "output compact": "d2b94d1517ad80ea" + "output compact": "e345f0377ecbe795" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/get_objc_classes.json b/scripts/verify/advertised-schemas/tools/get_objc_classes.json index 275aa25e5f..d28d17fe9d 100644 --- a/scripts/verify/advertised-schemas/tools/get_objc_classes.json +++ b/scripts/verify/advertised-schemas/tools/get_objc_classes.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "e2e179a75a6a8189", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/get_objc_protocols.json b/scripts/verify/advertised-schemas/tools/get_objc_protocols.json index a79c420e49..ec24e65214 100644 --- a/scripts/verify/advertised-schemas/tools/get_objc_protocols.json +++ b/scripts/verify/advertised-schemas/tools/get_objc_protocols.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "32062bdb9024160d", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/goto_address.json b/scripts/verify/advertised-schemas/tools/goto_address.json index 9f10676e6e..131f00b906 100644 --- a/scripts/verify/advertised-schemas/tools/goto_address.json +++ b/scripts/verify/advertised-schemas/tools/goto_address.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "940657f284593726", - "output compact": "8e073f5fb72b5a75" + "output compact": "eb88868dbb05b21e" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/guided_workflows.json b/scripts/verify/advertised-schemas/tools/guided_workflows.json index 4b93af03d4..6f48c72981 100644 --- a/scripts/verify/advertised-schemas/tools/guided_workflows.json +++ b/scripts/verify/advertised-schemas/tools/guided_workflows.json @@ -1,7 +1,7 @@ { "schemas": { "input compact": "eab443f9a403d9f4", - "output compact": "cfbfd56ba41b60ad" + "output compact": "a21a0bc91288eebd" }, "patterns": {} } diff --git a/scripts/verify/advertised-schemas/tools/identify_flutter_build.json b/scripts/verify/advertised-schemas/tools/identify_flutter_build.json index 5203206186..170ca87e64 100644 --- a/scripts/verify/advertised-schemas/tools/identify_flutter_build.json +++ b/scripts/verify/advertised-schemas/tools/identify_flutter_build.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "b0b894f04ba77b8d", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/import_evidence_bundle.json b/scripts/verify/advertised-schemas/tools/import_evidence_bundle.json index d8c3d46d46..4c25f6a570 100644 --- a/scripts/verify/advertised-schemas/tools/import_evidence_bundle.json +++ b/scripts/verify/advertised-schemas/tools/import_evidence_bundle.json @@ -1,9 +1,9 @@ { "schemas": { - "input compact": "18d266261424a97c", + "input compact": "88c419670dc83b73", "output compact": "6c6c35e1ceaeb7ae" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"] } } diff --git a/scripts/verify/advertised-schemas/tools/import_managed_reconstruction.json b/scripts/verify/advertised-schemas/tools/import_managed_reconstruction.json index 85b9b0b1b3..5d0639ed29 100644 --- a/scripts/verify/advertised-schemas/tools/import_managed_reconstruction.json +++ b/scripts/verify/advertised-schemas/tools/import_managed_reconstruction.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "fb435e80880f314a", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^0x[0-9a-f]{8}$", "^[0-9a-f]{64}$"] + "input": ["^0x[0-9a-f]{8}$", "^[0-9a-f]{64}$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inline_comment.json b/scripts/verify/advertised-schemas/tools/inline_comment.json index fb20c66cfb..2fd0db099d 100644 --- a/scripts/verify/advertised-schemas/tools/inline_comment.json +++ b/scripts/verify/advertised-schemas/tools/inline_comment.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "c3e7279c968e665b", - "output compact": "a0ef8b2e69cf9187" + "output compact": "4303053d476037d2" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_adb_client.json b/scripts/verify/advertised-schemas/tools/inspect_adb_client.json index a79c420e49..ec24e65214 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_adb_client.json +++ b/scripts/verify/advertised-schemas/tools/inspect_adb_client.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "32062bdb9024160d", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_adb_device.json b/scripts/verify/advertised-schemas/tools/inspect_adb_device.json index cc89a6438e..b673541035 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_adb_device.json +++ b/scripts/verify/advertised-schemas/tools/inspect_adb_device.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "0eefd4f4245ea66b", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00\\x09-\\x0d \"']+$"] + "input": ["^[^\\x00\\x09-\\x0d \"']+$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_adb_display.json b/scripts/verify/advertised-schemas/tools/inspect_adb_display.json index cc89a6438e..b673541035 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_adb_display.json +++ b/scripts/verify/advertised-schemas/tools/inspect_adb_display.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "0eefd4f4245ea66b", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00\\x09-\\x0d \"']+$"] + "input": ["^[^\\x00\\x09-\\x0d \"']+$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_adb_package.json b/scripts/verify/advertised-schemas/tools/inspect_adb_package.json index c267aa3120..282c72ae8b 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_adb_package.json +++ b/scripts/verify/advertised-schemas/tools/inspect_adb_package.json @@ -1,12 +1,13 @@ { "schemas": { "input compact": "2d6b5bb69d217de1", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { "input": [ "^[A-Za-z][0-9A-Z_a-z]*(\\.[A-Za-z][0-9A-Z_a-z]*)*$", "^[^\\x00\\x09-\\x0d \"']+$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_adb_window.json b/scripts/verify/advertised-schemas/tools/inspect_adb_window.json index cc89a6438e..b673541035 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_adb_window.json +++ b/scripts/verify/advertised-schemas/tools/inspect_adb_window.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "0eefd4f4245ea66b", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00\\x09-\\x0d \"']+$"] + "input": ["^[^\\x00\\x09-\\x0d \"']+$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_analysis_settings.json b/scripts/verify/advertised-schemas/tools/inspect_analysis_settings.json index 5d3a7de75d..c4c99a1028 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_analysis_settings.json +++ b/scripts/verify/advertised-schemas/tools/inspect_analysis_settings.json @@ -1,7 +1,7 @@ { "schemas": { "input compact": "0f8207f2279093da", - "output compact": "b3a429110120aff1" + "output compact": "4022c68d15dc6b7d" }, "patterns": {} } diff --git a/scripts/verify/advertised-schemas/tools/inspect_analysis_view.json b/scripts/verify/advertised-schemas/tools/inspect_analysis_view.json index b22b61bdbf..779a315620 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_analysis_view.json +++ b/scripts/verify/advertised-schemas/tools/inspect_analysis_view.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "99dbe34c28cd04dd", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_android_class.json b/scripts/verify/advertised-schemas/tools/inspect_android_class.json index e91742c213..da3f5768f7 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_android_class.json +++ b/scripts/verify/advertised-schemas/tools/inspect_android_class.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "56738775db12a59b", - "output compact": "d2b94d1517ad80ea" + "input compact": "79f18f7a44bf45b7", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", "^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_android_jni_bindings.json b/scripts/verify/advertised-schemas/tools/inspect_android_jni_bindings.json index 2018030206..bf933e86a7 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_android_jni_bindings.json +++ b/scripts/verify/advertised-schemas/tools/inspect_android_jni_bindings.json @@ -1,12 +1,13 @@ { "schemas": { "input compact": "8dbbfd8bfbf1a801", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { "input": [ "^[^\\x00]*$", "^\\((?:\\[*(?:[B-DFIJSZ]|L[^\\(\\);]+;))*\\)(?:V|\\[*(?:[B-DFIJSZ]|L[^\\(\\);]+;))$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_android_method.json b/scripts/verify/advertised-schemas/tools/inspect_android_method.json index b14b7318ce..00ad8a226a 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_android_method.json +++ b/scripts/verify/advertised-schemas/tools/inspect_android_method.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "961c1bc71b1cf86f", - "output compact": "d2b94d1517ad80ea" + "input compact": "07c1f92eb844cea0", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", "^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_android_package.json b/scripts/verify/advertised-schemas/tools/inspect_android_package.json index 8b4cfbb6f1..253b41600f 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_android_package.json +++ b/scripts/verify/advertised-schemas/tools/inspect_android_package.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "79d06f0abbf80d96", - "output compact": "d2b94d1517ad80ea" + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_api_contract.json b/scripts/verify/advertised-schemas/tools/inspect_api_contract.json index 983dd7e4ec..666620e633 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_api_contract.json +++ b/scripts/verify/advertised-schemas/tools/inspect_api_contract.json @@ -1,7 +1,10 @@ { "schemas": { - "input compact": "79519ee02b61df07", - "output compact": "fc6c5d5a78a47254" + "input compact": "25a6c766e09a2637", + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_apk_signature.json b/scripts/verify/advertised-schemas/tools/inspect_apk_signature.json index f04acff532..43475e6035 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_apk_signature.json +++ b/scripts/verify/advertised-schemas/tools/inspect_apk_signature.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "a130f123d585a1c4", - "output compact": "fc6c5d5a78a47254" + "input compact": "af7b73a9f218dcd1", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_apktool_client.json b/scripts/verify/advertised-schemas/tools/inspect_apktool_client.json index a79c420e49..ec24e65214 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_apktool_client.json +++ b/scripts/verify/advertised-schemas/tools/inspect_apktool_client.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "32062bdb9024160d", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_apple_ips.json b/scripts/verify/advertised-schemas/tools/inspect_apple_ips.json index 35df6c097c..96dd323994 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_apple_ips.json +++ b/scripts/verify/advertised-schemas/tools/inspect_apple_ips.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "c55c03a1cfb12bf4", - "output compact": "fc6c5d5a78a47254" + "input compact": "19de6cc801b2b636", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_artifact.json b/scripts/verify/advertised-schemas/tools/inspect_artifact.json index 375552b5bd..f7a54fa97e 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_artifact.json +++ b/scripts/verify/advertised-schemas/tools/inspect_artifact.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "16bf0853f5fb7fa0", - "output compact": "d2b94d1517ad80ea" + "input compact": "a0e12b5062d24ad7", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_asset_catalog.json b/scripts/verify/advertised-schemas/tools/inspect_asset_catalog.json index 9ae8f9749c..aba90a7d5f 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_asset_catalog.json +++ b/scripts/verify/advertised-schemas/tools/inspect_asset_catalog.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "bf625862854e50fa", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_binary_hardening.json b/scripts/verify/advertised-schemas/tools/inspect_binary_hardening.json index 7c1a0285ae..423c8511d5 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_binary_hardening.json +++ b/scripts/verify/advertised-schemas/tools/inspect_binary_hardening.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "dd9984f2fafaf1c9", - "output compact": "fc6c5d5a78a47254" + "input compact": "bd0f53ea0de97a47", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_binary_layout.json b/scripts/verify/advertised-schemas/tools/inspect_binary_layout.json index eaff9da4ab..57779a5895 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_binary_layout.json +++ b/scripts/verify/advertised-schemas/tools/inspect_binary_layout.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "23e5246e6a440825", - "output compact": "d2b94d1517ad80ea" + "input compact": "e591502ca08f7a7f", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_byte_entropy.json b/scripts/verify/advertised-schemas/tools/inspect_byte_entropy.json index ad55c5c208..52a0ec6ed9 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_byte_entropy.json +++ b/scripts/verify/advertised-schemas/tools/inspect_byte_entropy.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "3fe6fb83f79175c6", - "output compact": "d2b94d1517ad80ea" + "input compact": "515df4f80547d12c", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_dart_aot.json b/scripts/verify/advertised-schemas/tools/inspect_dart_aot.json index 14d65dd045..0524ab8653 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_dart_aot.json +++ b/scripts/verify/advertised-schemas/tools/inspect_dart_aot.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "2476699dc41f6dc7", - "output compact": "d2b94d1517ad80ea" + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$", "^[^\\x2f]*$"] + "input": ["^[^\\x00]*$", "^[^\\x2f]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_deb_package.json b/scripts/verify/advertised-schemas/tools/inspect_deb_package.json index 899c93a3ff..30fb7c1493 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_deb_package.json +++ b/scripts/verify/advertised-schemas/tools/inspect_deb_package.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "9dbdd7bf9deef4cf", - "output compact": "fc6c5d5a78a47254" + "input compact": "ce7508ad7f84847e", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_desktop_application.json b/scripts/verify/advertised-schemas/tools/inspect_desktop_application.json index 16fc132dca..2338777117 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_desktop_application.json +++ b/scripts/verify/advertised-schemas/tools/inspect_desktop_application.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "f7cf5551a6ffd825", - "output compact": "fc6c5d5a78a47254" + "input compact": "5a7edb0bfb7e39e4", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_devicetree.json b/scripts/verify/advertised-schemas/tools/inspect_devicetree.json index d1cd9edf32..fd86c4cf02 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_devicetree.json +++ b/scripts/verify/advertised-schemas/tools/inspect_devicetree.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "9047b0c5aef153cd", - "output compact": "d2b94d1517ad80ea" + "input compact": "92e7756c758ec014", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_dwarf_units.json b/scripts/verify/advertised-schemas/tools/inspect_dwarf_units.json index d5c5dcb258..1e7dddbb04 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_dwarf_units.json +++ b/scripts/verify/advertised-schemas/tools/inspect_dwarf_units.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "05f8e7b2a79590b2", - "output compact": "fc6c5d5a78a47254" + "input compact": "f00c1b6fc5b4e63f", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_electron_fuses.json b/scripts/verify/advertised-schemas/tools/inspect_electron_fuses.json index ea69991dc3..1122affe6d 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_electron_fuses.json +++ b/scripts/verify/advertised-schemas/tools/inspect_electron_fuses.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "18d266261424a97c", - "output compact": "fc6c5d5a78a47254" + "input compact": "88c419670dc83b73", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_electron_page.json b/scripts/verify/advertised-schemas/tools/inspect_electron_page.json index 2c1f738e85..e1a825899e 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_electron_page.json +++ b/scripts/verify/advertised-schemas/tools/inspect_electron_page.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "d62275796c282288", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_elf_debug_link.json b/scripts/verify/advertised-schemas/tools/inspect_elf_debug_link.json index 4a543e889e..800b99189b 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_elf_debug_link.json +++ b/scripts/verify/advertised-schemas/tools/inspect_elf_debug_link.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "0b9ed6b14ffac536", - "output compact": "fc6c5d5a78a47254" + "input compact": "fe921bea2c3150c4", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_elf_dependencies.json b/scripts/verify/advertised-schemas/tools/inspect_elf_dependencies.json index 15d4ab26e3..14a609a6e5 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_elf_dependencies.json +++ b/scripts/verify/advertised-schemas/tools/inspect_elf_dependencies.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "30fb8db090aa6071", - "output compact": "d2b94d1517ad80ea" + "input compact": "792f227c838ba1d0", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_elf_notes.json b/scripts/verify/advertised-schemas/tools/inspect_elf_notes.json index 858ab5faef..36276cae2a 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_elf_notes.json +++ b/scripts/verify/advertised-schemas/tools/inspect_elf_notes.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "8b30e04cd3ac0805", - "output compact": "fc6c5d5a78a47254" + "input compact": "6dfcebe04d15152d", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_elf_unwind_ranges.json b/scripts/verify/advertised-schemas/tools/inspect_elf_unwind_ranges.json index d0d0e9b968..fd669a0f1d 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_elf_unwind_ranges.json +++ b/scripts/verify/advertised-schemas/tools/inspect_elf_unwind_ranges.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "eb43cfe89670b28c", - "output compact": "fc6c5d5a78a47254" + "input compact": "4ea30998c5af2659", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_erlang_beam.json b/scripts/verify/advertised-schemas/tools/inspect_erlang_beam.json index b117747303..9206ade78c 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_erlang_beam.json +++ b/scripts/verify/advertised-schemas/tools/inspect_erlang_beam.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "447bb9e9132f0384", - "output compact": "d2b94d1517ad80ea" + "input compact": "e86e85658a1833c0", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_esp_nvs.json b/scripts/verify/advertised-schemas/tools/inspect_esp_nvs.json index fac2c8cc87..8cfe12421a 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_esp_nvs.json +++ b/scripts/verify/advertised-schemas/tools/inspect_esp_nvs.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "b805503666f3d982", - "output compact": "d2b94d1517ad80ea" + "input compact": "f1b040d7f8b211f1", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_evm_interface.json b/scripts/verify/advertised-schemas/tools/inspect_evm_interface.json index b24eee5001..e9bba3e3b5 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_evm_interface.json +++ b/scripts/verify/advertised-schemas/tools/inspect_evm_interface.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "432b9d1cce8cbaa1", - "output compact": "d2b94d1517ad80ea" + "input compact": "27fd8ebd0c548240", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_evtx_archive.json b/scripts/verify/advertised-schemas/tools/inspect_evtx_archive.json index 51facac28a..ac21b6cede 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_evtx_archive.json +++ b/scripts/verify/advertised-schemas/tools/inspect_evtx_archive.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "95716cd5713d57c4", - "output compact": "d2b94d1517ad80ea" + "input compact": "d7e391187d0da349", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_firmware_regions.json b/scripts/verify/advertised-schemas/tools/inspect_firmware_regions.json index 2d299191c6..fd46d01c9a 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_firmware_regions.json +++ b/scripts/verify/advertised-schemas/tools/inspect_firmware_regions.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "ac72671d7bdc9ed4", - "output compact": "fc6c5d5a78a47254" + "input compact": "d5a86bf1ebfdca46", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_firmware_vector_table.json b/scripts/verify/advertised-schemas/tools/inspect_firmware_vector_table.json index 0c1b9c093c..abe2619d4e 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_firmware_vector_table.json +++ b/scripts/verify/advertised-schemas/tools/inspect_firmware_vector_table.json @@ -1,9 +1,13 @@ { "schemas": { - "input compact": "80b17fd02e3831bb", - "output compact": "d2b94d1517ad80ea" + "input compact": "89de3f7a7e5797c0", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^0x[0-9A-Fa-f]{1,8}$", "^[^\\x00]*$"] + "input": [ + "^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", + "^0x[0-9A-Fa-f]{1,8}$" + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_go_binary.json b/scripts/verify/advertised-schemas/tools/inspect_go_binary.json index 6f518f1228..f731cc2407 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_go_binary.json +++ b/scripts/verify/advertised-schemas/tools/inspect_go_binary.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "4da052ea4100ae2a", - "output compact": "d2b94d1517ad80ea" + "input compact": "2062784df5a7d352", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_gpu_code_objects.json b/scripts/verify/advertised-schemas/tools/inspect_gpu_code_objects.json index 0e9c123aba..88e3a1a4f4 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_gpu_code_objects.json +++ b/scripts/verify/advertised-schemas/tools/inspect_gpu_code_objects.json @@ -1,9 +1,13 @@ { "schemas": { - "input compact": "48e65025c05627f4", - "output compact": "fc6c5d5a78a47254" + "input compact": "d3eb4dd454a8b92b", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[0-9a-f]{64}$", "^[^\\x00]*$"] + "input": [ + "^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", + "^[0-9a-f]{64}$" + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_il2cpp_metadata.json b/scripts/verify/advertised-schemas/tools/inspect_il2cpp_metadata.json index 6fbd17e327..975f3766c4 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_il2cpp_metadata.json +++ b/scripts/verify/advertised-schemas/tools/inspect_il2cpp_metadata.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "dfe942025da7fe6e", - "output compact": "fc6c5d5a78a47254" + "input compact": "ba2fcac1e38306b4", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_jeb_client.json b/scripts/verify/advertised-schemas/tools/inspect_jeb_client.json index a79c420e49..ec24e65214 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_jeb_client.json +++ b/scripts/verify/advertised-schemas/tools/inspect_jeb_client.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "32062bdb9024160d", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_kernel_build_config.json b/scripts/verify/advertised-schemas/tools/inspect_kernel_build_config.json index f8a344b143..7b46646c94 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_kernel_build_config.json +++ b/scripts/verify/advertised-schemas/tools/inspect_kernel_build_config.json @@ -1,9 +1,13 @@ { "schemas": { - "input compact": "67f91f8c76d696c7", - "output compact": "fc6c5d5a78a47254" + "input compact": "b5bea3d57eaba074", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^CONFIG_[0-9A-Z_a-z]+$", "^[^\\x00]*$"] + "input": [ + "^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", + "^CONFIG_[0-9A-Z_a-z]+$" + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_kernel_module.json b/scripts/verify/advertised-schemas/tools/inspect_kernel_module.json index a363b538a0..b5e5192285 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_kernel_module.json +++ b/scripts/verify/advertised-schemas/tools/inspect_kernel_module.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "ca891ab3a866f2ad", - "output compact": "fc6c5d5a78a47254" + "input compact": "e2014a5781014cda", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_keyed_archive.json b/scripts/verify/advertised-schemas/tools/inspect_keyed_archive.json index 304320d748..18e5a203a0 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_keyed_archive.json +++ b/scripts/verify/advertised-schemas/tools/inspect_keyed_archive.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "b3d6b50f46b084c5", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_labview_artifact.json b/scripts/verify/advertised-schemas/tools/inspect_labview_artifact.json index 4105d21994..dcfde57cb7 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_labview_artifact.json +++ b/scripts/verify/advertised-schemas/tools/inspect_labview_artifact.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "983af8eae7e1bbb7", - "output compact": "d2b94d1517ad80ea" + "input compact": "b771605773d3049f", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_macho.json b/scripts/verify/advertised-schemas/tools/inspect_macho.json index c7682e0cc8..05b62e82f1 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_macho.json +++ b/scripts/verify/advertised-schemas/tools/inspect_macho.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "d50348f9415e6058", - "output compact": "d2b94d1517ad80ea" + "output compact": "e345f0377ecbe795" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_macho_function_starts.json b/scripts/verify/advertised-schemas/tools/inspect_macho_function_starts.json index d3016283ec..d635dd7cd7 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_macho_function_starts.json +++ b/scripts/verify/advertised-schemas/tools/inspect_macho_function_starts.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "6746e8a82cfb7ec9", - "output compact": "fc6c5d5a78a47254" + "input compact": "cfe6100c478d504e", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_managed_artifact.json b/scripts/verify/advertised-schemas/tools/inspect_managed_artifact.json index bc9377a855..f246a0da72 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_managed_artifact.json +++ b/scripts/verify/advertised-schemas/tools/inspect_managed_artifact.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "f7bf3f8936afcd55", - "output compact": "d2b94d1517ad80ea" + "input compact": "510af829996c85ea", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_managed_members.json b/scripts/verify/advertised-schemas/tools/inspect_managed_members.json index fc3b561eb9..b0fdc12676 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_managed_members.json +++ b/scripts/verify/advertised-schemas/tools/inspect_managed_members.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "273b3dc42f7bd1f5", - "output compact": "d2b94d1517ad80ea" + "input compact": "b830199cd7a8f739", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_managed_native_boundaries.json b/scripts/verify/advertised-schemas/tools/inspect_managed_native_boundaries.json index 83041d089c..d7ed058690 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_managed_native_boundaries.json +++ b/scripts/verify/advertised-schemas/tools/inspect_managed_native_boundaries.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "1f819bf93544186a", - "output compact": "fc6c5d5a78a47254" + "input compact": "efe37bdf62fb5803", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_maven_gradle_metadata.json b/scripts/verify/advertised-schemas/tools/inspect_maven_gradle_metadata.json index 4d7dcb3846..8e63591dd4 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_maven_gradle_metadata.json +++ b/scripts/verify/advertised-schemas/tools/inspect_maven_gradle_metadata.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "53d3b80917065967", - "output compact": "fc6c5d5a78a47254" + "input compact": "9a48e5e63105137f", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_model_artifact.json b/scripts/verify/advertised-schemas/tools/inspect_model_artifact.json index 897f7ad95a..856f0af9bc 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_model_artifact.json +++ b/scripts/verify/advertised-schemas/tools/inspect_model_artifact.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "d8f23fd89529aeab", - "output compact": "fc6c5d5a78a47254" + "input compact": "7ef5e9d63dda272a", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_native_api.json b/scripts/verify/advertised-schemas/tools/inspect_native_api.json index 24eda29f8e..e706d81cdf 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_native_api.json +++ b/scripts/verify/advertised-schemas/tools/inspect_native_api.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "e1341c240f08c350", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_native_data_type.json b/scripts/verify/advertised-schemas/tools/inspect_native_data_type.json index 4dede4f96a..45346bb5f0 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_native_data_type.json +++ b/scripts/verify/advertised-schemas/tools/inspect_native_data_type.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "957e0a1d7fa1bd33", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_native_dispatch_metadata.json b/scripts/verify/advertised-schemas/tools/inspect_native_dispatch_metadata.json index db24bdbf1c..096ac87231 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_native_dispatch_metadata.json +++ b/scripts/verify/advertised-schemas/tools/inspect_native_dispatch_metadata.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "743838105118ca29", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_native_exports.json b/scripts/verify/advertised-schemas/tools/inspect_native_exports.json index 5c05a683f8..037560a933 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_native_exports.json +++ b/scripts/verify/advertised-schemas/tools/inspect_native_exports.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "99a593e8ee1b1a36", - "output compact": "d2b94d1517ad80ea" + "input compact": "02320b9942048842", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_native_initializers.json b/scripts/verify/advertised-schemas/tools/inspect_native_initializers.json index ebf30ef817..0914c617a6 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_native_initializers.json +++ b/scripts/verify/advertised-schemas/tools/inspect_native_initializers.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "116394f67f74e433", - "output compact": "fc6c5d5a78a47254" + "input compact": "86ed9325eae3cc87", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_native_instruction.json b/scripts/verify/advertised-schemas/tools/inspect_native_instruction.json index 95aa9f24d7..6f0b19690b 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_native_instruction.json +++ b/scripts/verify/advertised-schemas/tools/inspect_native_instruction.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "940657f284593726", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_native_load_image.json b/scripts/verify/advertised-schemas/tools/inspect_native_load_image.json index 7502f2c930..edf769ec28 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_native_load_image.json +++ b/scripts/verify/advertised-schemas/tools/inspect_native_load_image.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "1e3af2bde466363b", - "output compact": "d2b94d1517ad80ea" + "output compact": "e345f0377ecbe795" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_ntfs_journal.json b/scripts/verify/advertised-schemas/tools/inspect_ntfs_journal.json index a0b5f79a3b..5182c09580 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_ntfs_journal.json +++ b/scripts/verify/advertised-schemas/tools/inspect_ntfs_journal.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "8d1d2e2907a828da", - "output compact": "fc6c5d5a78a47254" + "input compact": "30208b7779808849", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_nuget_nupkg.json b/scripts/verify/advertised-schemas/tools/inspect_nuget_nupkg.json index dcf3a5ed39..4703068b56 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_nuget_nupkg.json +++ b/scripts/verify/advertised-schemas/tools/inspect_nuget_nupkg.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "515d445c21827e5c", - "output compact": "d2b94d1517ad80ea" + "input compact": "97bdd30421b2a3df", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_oci_image_layout.json b/scripts/verify/advertised-schemas/tools/inspect_oci_image_layout.json index 6b4c2119aa..b917c1df16 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_oci_image_layout.json +++ b/scripts/verify/advertised-schemas/tools/inspect_oci_image_layout.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "46784e3380ef2921", - "output compact": "d2b94d1517ad80ea" + "input compact": "0989dbd37faa3149", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_packet_capture.json b/scripts/verify/advertised-schemas/tools/inspect_packet_capture.json index 417b19835b..347c11d298 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_packet_capture.json +++ b/scripts/verify/advertised-schemas/tools/inspect_packet_capture.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "70b0e7fbb4c73e61", - "output compact": "fc6c5d5a78a47254" + "input compact": "dc16d28d33f44ecc", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", "^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_packet_fields.json b/scripts/verify/advertised-schemas/tools/inspect_packet_fields.json index 525ce369a4..41cb01d3aa 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_packet_fields.json +++ b/scripts/verify/advertised-schemas/tools/inspect_packet_fields.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "6acc5ad4d85e761a", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_pcap_capture.json b/scripts/verify/advertised-schemas/tools/inspect_pcap_capture.json index f07e668784..9ed713f6c8 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_pcap_capture.json +++ b/scripts/verify/advertised-schemas/tools/inspect_pcap_capture.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "5d8db1d69f56b939", - "output compact": "d2b94d1517ad80ea" + "input compact": "c1a6ebcd8cf5a5fd", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_pcap_client.json b/scripts/verify/advertised-schemas/tools/inspect_pcap_client.json index a79c420e49..ec24e65214 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_pcap_client.json +++ b/scripts/verify/advertised-schemas/tools/inspect_pcap_client.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "32062bdb9024160d", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_pe_certificates.json b/scripts/verify/advertised-schemas/tools/inspect_pe_certificates.json index 0138deddbf..53d1882ea7 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_pe_certificates.json +++ b/scripts/verify/advertised-schemas/tools/inspect_pe_certificates.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "eaa9f9a271f19ee9", - "output compact": "fc6c5d5a78a47254" + "input compact": "58f6b5fe4efbc181", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_pe_imports.json b/scripts/verify/advertised-schemas/tools/inspect_pe_imports.json index 82c762affe..930eadc6a4 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_pe_imports.json +++ b/scripts/verify/advertised-schemas/tools/inspect_pe_imports.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "0e00415303d0eaf5", - "output compact": "fc6c5d5a78a47254" + "input compact": "b884592f9f938c18", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_pe_load_config.json b/scripts/verify/advertised-schemas/tools/inspect_pe_load_config.json index d7a1d6ee7f..41cc853c2a 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_pe_load_config.json +++ b/scripts/verify/advertised-schemas/tools/inspect_pe_load_config.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "ea4a836a963d167b", - "output compact": "fc6c5d5a78a47254" + "input compact": "d3d90cb80c886977", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_pe_overlay.json b/scripts/verify/advertised-schemas/tools/inspect_pe_overlay.json index e430bfb38b..eabeff0602 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_pe_overlay.json +++ b/scripts/verify/advertised-schemas/tools/inspect_pe_overlay.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "c2417cfbfd1a4976", - "output compact": "fc6c5d5a78a47254" + "input compact": "6f43bd441e75d1a1", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_pe_resources.json b/scripts/verify/advertised-schemas/tools/inspect_pe_resources.json index 1784c863a6..9875a561f7 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_pe_resources.json +++ b/scripts/verify/advertised-schemas/tools/inspect_pe_resources.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "6f5af1b514fd7cec", - "output compact": "fc6c5d5a78a47254" + "input compact": "32364448b819fadb", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_pe_unwind_ranges.json b/scripts/verify/advertised-schemas/tools/inspect_pe_unwind_ranges.json index c47249139d..69a3ce668e 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_pe_unwind_ranges.json +++ b/scripts/verify/advertised-schemas/tools/inspect_pe_unwind_ranges.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "4532ddfa0dbb5bc7", - "output compact": "fc6c5d5a78a47254" + "input compact": "3bc0e65e4273db83", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_playwright_trace.json b/scripts/verify/advertised-schemas/tools/inspect_playwright_trace.json index 589f2221bd..9444c8e0ed 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_playwright_trace.json +++ b/scripts/verify/advertised-schemas/tools/inspect_playwright_trace.json @@ -1,14 +1,15 @@ { "schemas": { - "input compact": "eb30456d7e5c1d8e", - "output compact": "fc6c5d5a78a47254" + "input compact": "5d2db0eb1bed3117", + "output compact": "4babf3ed292a48aa" }, "patterns": { "input": [ - "^[^\\x00]*$", + "^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", "^trace_event_[0-9a-f]{64}$", "^trace_member_[0-9a-f]{64}$", "^trace_stream_[0-9a-f]{64}$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_plist.json b/scripts/verify/advertised-schemas/tools/inspect_plist.json index 8cf486024c..815ccdaa05 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_plist.json +++ b/scripts/verify/advertised-schemas/tools/inspect_plist.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "c22855860d96f2a7", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_python_pyc.json b/scripts/verify/advertised-schemas/tools/inspect_python_pyc.json index 2bde434281..2f4c9c616c 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_python_pyc.json +++ b/scripts/verify/advertised-schemas/tools/inspect_python_pyc.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "d77cd7aa06705c28", - "output compact": "d2b94d1517ad80ea" + "input compact": "3ed0d656a6e9bfe2", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_recorded_crash.json b/scripts/verify/advertised-schemas/tools/inspect_recorded_crash.json index 22a1ec10cb..5b70efdf57 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_recorded_crash.json +++ b/scripts/verify/advertised-schemas/tools/inspect_recorded_crash.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "ed896c6083b81754", - "output compact": "fc6c5d5a78a47254" + "input compact": "63b7111ba77d26aa", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_rust_binary.json b/scripts/verify/advertised-schemas/tools/inspect_rust_binary.json index 868b203965..176cf0ac18 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_rust_binary.json +++ b/scripts/verify/advertised-schemas/tools/inspect_rust_binary.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "454f43f2d5b6b374", - "output compact": "d2b94d1517ad80ea" + "input compact": "87d1c86ed7b5d4ab", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_signal_decoders.json b/scripts/verify/advertised-schemas/tools/inspect_signal_decoders.json index e3e0c5016a..fe131b5a88 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_signal_decoders.json +++ b/scripts/verify/advertised-schemas/tools/inspect_signal_decoders.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "31f1ee648744d596", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[+\\-0-9A-Z_a-z]+$"] + "input": ["^[+\\-0-9A-Z_a-z]+$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_signature.json b/scripts/verify/advertised-schemas/tools/inspect_signature.json index b51ed46119..34dcbc251c 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_signature.json +++ b/scripts/verify/advertised-schemas/tools/inspect_signature.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "fcb6d54fec138c1e", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_sqlite_database.json b/scripts/verify/advertised-schemas/tools/inspect_sqlite_database.json index a530d13545..fe8512f2a8 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_sqlite_database.json +++ b/scripts/verify/advertised-schemas/tools/inspect_sqlite_database.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "c47c3e51026ad256", - "output compact": "fc6c5d5a78a47254" + "input compact": "0b0b771ac8556ba4", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_uefi_firmware.json b/scripts/verify/advertised-schemas/tools/inspect_uefi_firmware.json index 7f9caf3ff5..cd5569695f 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_uefi_firmware.json +++ b/scripts/verify/advertised-schemas/tools/inspect_uefi_firmware.json @@ -1,12 +1,13 @@ { "schemas": { "input compact": "a704b08506e82abe", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { "input": [ "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$", "^[^\\x00]*$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_uefi_nvram.json b/scripts/verify/advertised-schemas/tools/inspect_uefi_nvram.json index f466eff1a9..bff017e7b7 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_uefi_nvram.json +++ b/scripts/verify/advertised-schemas/tools/inspect_uefi_nvram.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "0b09538337a8f816", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_v8_code_cache.json b/scripts/verify/advertised-schemas/tools/inspect_v8_code_cache.json index fb2a9b92cf..e2bfb51317 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_v8_code_cache.json +++ b/scripts/verify/advertised-schemas/tools/inspect_v8_code_cache.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "17341f97702a0422", - "output compact": "fc6c5d5a78a47254" + "input compact": "81eec70d5e8fd756", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_vsix_package.json b/scripts/verify/advertised-schemas/tools/inspect_vsix_package.json index 360548fcfa..63b2066d5f 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_vsix_package.json +++ b/scripts/verify/advertised-schemas/tools/inspect_vsix_package.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "1f60381afcd13a28", - "output compact": "d2b94d1517ad80ea" + "input compact": "903edc5f2549a3aa", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_wasm_artifact.json b/scripts/verify/advertised-schemas/tools/inspect_wasm_artifact.json index a3eea723c8..1af81c7eaf 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_wasm_artifact.json +++ b/scripts/verify/advertised-schemas/tools/inspect_wasm_artifact.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "4d6179b4d0d694c1", - "output compact": "d2b94d1517ad80ea" + "input compact": "11990d4a616ac217", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_web_event_listeners.json b/scripts/verify/advertised-schemas/tools/inspect_web_event_listeners.json index b0b75848eb..7456654d33 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_web_event_listeners.json +++ b/scripts/verify/advertised-schemas/tools/inspect_web_event_listeners.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "2ef444a0a29f50e4", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_web_network_capture.json b/scripts/verify/advertised-schemas/tools/inspect_web_network_capture.json index 8fb9e9ae34..335f665335 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_web_network_capture.json +++ b/scripts/verify/advertised-schemas/tools/inspect_web_network_capture.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "e30c9b8ea56dc0da", - "output compact": "d2b94d1517ad80ea" + "input compact": "4ce43ba3aebc2556", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_web_page.json b/scripts/verify/advertised-schemas/tools/inspect_web_page.json index 6be3a39024..1f9d939f30 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_web_page.json +++ b/scripts/verify/advertised-schemas/tools/inspect_web_page.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "37c2c73ee2d1c5e6", - "output compact": "d2b94d1517ad80ea" + "output compact": "e345f0377ecbe795" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_windows_shortcut.json b/scripts/verify/advertised-schemas/tools/inspect_windows_shortcut.json index 0788514328..1e3bb8bae4 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_windows_shortcut.json +++ b/scripts/verify/advertised-schemas/tools/inspect_windows_shortcut.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "f7055432bf97761a", - "output compact": "fc6c5d5a78a47254" + "input compact": "fbcb007a5b81f9b3", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_with_objdump.json b/scripts/verify/advertised-schemas/tools/inspect_with_objdump.json index 7b91f90231..69190e6518 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_with_objdump.json +++ b/scripts/verify/advertised-schemas/tools/inspect_with_objdump.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "f2ac113b26052065", - "output compact": "d2b94d1517ad80ea" + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/inspect_yara_matches.json b/scripts/verify/advertised-schemas/tools/inspect_yara_matches.json index 860bdfe7d9..afcbc5e6f5 100644 --- a/scripts/verify/advertised-schemas/tools/inspect_yara_matches.json +++ b/scripts/verify/advertised-schemas/tools/inspect_yara_matches.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "e8a9e0c4cd423964", - "output compact": "fc6c5d5a78a47254" + "input compact": "25d9d5dbd588f368", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/install_adb_package.json b/scripts/verify/advertised-schemas/tools/install_adb_package.json index d1247f793b..b6ff342218 100644 --- a/scripts/verify/advertised-schemas/tools/install_adb_package.json +++ b/scripts/verify/advertised-schemas/tools/install_adb_package.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "46f07cf88578ac7a", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00\\x09-\\x0d \"']+$", "^[^\\x00]*$"] + "input": ["^[^\\x00\\x09-\\x0d \"']+$", "^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/instrument_with_frida.json b/scripts/verify/advertised-schemas/tools/instrument_with_frida.json index cc4761d06b..558c1eaa6a 100644 --- a/scripts/verify/advertised-schemas/tools/instrument_with_frida.json +++ b/scripts/verify/advertised-schemas/tools/instrument_with_frida.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "d83d3a86dd1c0360", - "output compact": "fc6c5d5a78a47254" + "input compact": "990d2c9d5c391655", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", "^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/list_adb_devices.json b/scripts/verify/advertised-schemas/tools/list_adb_devices.json index a79c420e49..ec24e65214 100644 --- a/scripts/verify/advertised-schemas/tools/list_adb_devices.json +++ b/scripts/verify/advertised-schemas/tools/list_adb_devices.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "32062bdb9024160d", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/list_adb_directory.json b/scripts/verify/advertised-schemas/tools/list_adb_directory.json index 72dd1cc671..f9b30f4d80 100644 --- a/scripts/verify/advertised-schemas/tools/list_adb_directory.json +++ b/scripts/verify/advertised-schemas/tools/list_adb_directory.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "e03c8c6378576ccb", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^/[^\\x00]*$", "^[^\\x00\\x09-\\x0d \"']+$"] + "input": ["^/[^\\x00]*$", "^[^\\x00\\x09-\\x0d \"']+$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/list_adb_features.json b/scripts/verify/advertised-schemas/tools/list_adb_features.json index 1d8997ef0d..e1f2a9289f 100644 --- a/scripts/verify/advertised-schemas/tools/list_adb_features.json +++ b/scripts/verify/advertised-schemas/tools/list_adb_features.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "f6876dac509aa36b", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00\\x09-\\x0d \"']+$"] + "input": ["^[^\\x00\\x09-\\x0d \"']+$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/list_adb_packages.json b/scripts/verify/advertised-schemas/tools/list_adb_packages.json index 403cc4f246..47f2bdb640 100644 --- a/scripts/verify/advertised-schemas/tools/list_adb_packages.json +++ b/scripts/verify/advertised-schemas/tools/list_adb_packages.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "ba4a2bdc40629124", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00\\x09-\\x0d \"']+$"] + "input": ["^[^\\x00\\x09-\\x0d \"']+$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/list_adb_processes.json b/scripts/verify/advertised-schemas/tools/list_adb_processes.json index 1d8997ef0d..e1f2a9289f 100644 --- a/scripts/verify/advertised-schemas/tools/list_adb_processes.json +++ b/scripts/verify/advertised-schemas/tools/list_adb_processes.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "f6876dac509aa36b", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00\\x09-\\x0d \"']+$"] + "input": ["^[^\\x00\\x09-\\x0d \"']+$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/list_adb_services.json b/scripts/verify/advertised-schemas/tools/list_adb_services.json index 1d8997ef0d..e1f2a9289f 100644 --- a/scripts/verify/advertised-schemas/tools/list_adb_services.json +++ b/scripts/verify/advertised-schemas/tools/list_adb_services.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "f6876dac509aa36b", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00\\x09-\\x0d \"']+$"] + "input": ["^[^\\x00\\x09-\\x0d \"']+$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/list_architectures.json b/scripts/verify/advertised-schemas/tools/list_architectures.json index b51ed46119..34dcbc251c 100644 --- a/scripts/verify/advertised-schemas/tools/list_architectures.json +++ b/scripts/verify/advertised-schemas/tools/list_architectures.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "fcb6d54fec138c1e", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/list_bookmarks.json b/scripts/verify/advertised-schemas/tools/list_bookmarks.json index aa839d0f47..1bebd6dbcd 100644 --- a/scripts/verify/advertised-schemas/tools/list_bookmarks.json +++ b/scripts/verify/advertised-schemas/tools/list_bookmarks.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "4df1857d0f25b9b1", - "output compact": "b84133d46a6a9397" + "output compact": "e160c5002a8127d0" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/list_browser_targets.json b/scripts/verify/advertised-schemas/tools/list_browser_targets.json index bd04cc9832..848b1eb8bd 100644 --- a/scripts/verify/advertised-schemas/tools/list_browser_targets.json +++ b/scripts/verify/advertised-schemas/tools/list_browser_targets.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "cfdc32cb7dc51cda", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/list_documents.json b/scripts/verify/advertised-schemas/tools/list_documents.json index d41b0d509b..14b8fc374f 100644 --- a/scripts/verify/advertised-schemas/tools/list_documents.json +++ b/scripts/verify/advertised-schemas/tools/list_documents.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "32062bdb9024160d", - "output compact": "1cc000880a706678" + "output compact": "1ef3c10ad5e5f13a" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/list_electron_targets.json b/scripts/verify/advertised-schemas/tools/list_electron_targets.json index ae31c0a007..8c7c8864c1 100644 --- a/scripts/verify/advertised-schemas/tools/list_electron_targets.json +++ b/scripts/verify/advertised-schemas/tools/list_electron_targets.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "c32eb20cbe48cefa", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/list_javascript_runtime_targets.json b/scripts/verify/advertised-schemas/tools/list_javascript_runtime_targets.json index 6c2ac764bf..8eb47308bb 100644 --- a/scripts/verify/advertised-schemas/tools/list_javascript_runtime_targets.json +++ b/scripts/verify/advertised-schemas/tools/list_javascript_runtime_targets.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "2b836a5a8a6c41d0", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/list_jeb_units.json b/scripts/verify/advertised-schemas/tools/list_jeb_units.json index fc7c56644d..587c107146 100644 --- a/scripts/verify/advertised-schemas/tools/list_jeb_units.json +++ b/scripts/verify/advertised-schemas/tools/list_jeb_units.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "f6ad8e9a8e5d0766", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/list_names.json b/scripts/verify/advertised-schemas/tools/list_names.json index 204ea93a90..0583ca288a 100644 --- a/scripts/verify/advertised-schemas/tools/list_names.json +++ b/scripts/verify/advertised-schemas/tools/list_names.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "ad6deeb69e540106", - "output compact": "42b0abc4695d01f1" + "output compact": "746a7e33520fa80a" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/list_procedures.json b/scripts/verify/advertised-schemas/tools/list_procedures.json index 8490615d49..9e39fd15d7 100644 --- a/scripts/verify/advertised-schemas/tools/list_procedures.json +++ b/scripts/verify/advertised-schemas/tools/list_procedures.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "e6c23cc150ea72d5", - "output compact": "42b0abc4695d01f1" + "output compact": "746a7e33520fa80a" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/list_segments.json b/scripts/verify/advertised-schemas/tools/list_segments.json index aa839d0f47..1bebd6dbcd 100644 --- a/scripts/verify/advertised-schemas/tools/list_segments.json +++ b/scripts/verify/advertised-schemas/tools/list_segments.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "4df1857d0f25b9b1", - "output compact": "b84133d46a6a9397" + "output compact": "e160c5002a8127d0" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/list_strings.json b/scripts/verify/advertised-schemas/tools/list_strings.json index 204ea93a90..0583ca288a 100644 --- a/scripts/verify/advertised-schemas/tools/list_strings.json +++ b/scripts/verify/advertised-schemas/tools/list_strings.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "ad6deeb69e540106", - "output compact": "42b0abc4695d01f1" + "output compact": "746a7e33520fa80a" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/load_frida_script.json b/scripts/verify/advertised-schemas/tools/load_frida_script.json index 535f540602..0f0ed5da2c 100644 --- a/scripts/verify/advertised-schemas/tools/load_frida_script.json +++ b/scripts/verify/advertised-schemas/tools/load_frida_script.json @@ -1,12 +1,13 @@ { "schemas": { - "input compact": "ed20157c00980757", - "output compact": "fc6c5d5a78a47254" + "input compact": "ea5b7c0c31af2022", + "output compact": "4babf3ed292a48aa" }, "patterns": { "input": [ - "^([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-8][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$", - "^[^\\x00]*$" - ] + "^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", + "^([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-8][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/match_native_functions.json b/scripts/verify/advertised-schemas/tools/match_native_functions.json index ff41f345af..6f73536192 100644 --- a/scripts/verify/advertised-schemas/tools/match_native_functions.json +++ b/scripts/verify/advertised-schemas/tools/match_native_functions.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "599cd85c1c063ced", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/measure_build_task.json b/scripts/verify/advertised-schemas/tools/measure_build_task.json index fc2a390f55..fa7ce98452 100644 --- a/scripts/verify/advertised-schemas/tools/measure_build_task.json +++ b/scripts/verify/advertised-schemas/tools/measure_build_task.json @@ -1,9 +1,12 @@ { "schemas": { - "input compact": "e7f4c82c15a6ce96", + "input compact": "56c5c89509a861d8", "output compact": "ab60debdc7b65c85" }, "patterns": { - "input": ["^[0-9a-z]+(?:-[0-9a-z]+)*$", "^[^\\x00]*$"] + "input": [ + "^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", + "^[0-9a-z]+(?:-[0-9a-z]+)*$" + ] } } diff --git a/scripts/verify/advertised-schemas/tools/next_address.json b/scripts/verify/advertised-schemas/tools/next_address.json index 966ce2cdbf..c8eed36dd9 100644 --- a/scripts/verify/advertised-schemas/tools/next_address.json +++ b/scripts/verify/advertised-schemas/tools/next_address.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "c3e7279c968e665b", - "output compact": "8e073f5fb72b5a75" + "output compact": "eb88868dbb05b21e" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/observe_javascript_runtime.json b/scripts/verify/advertised-schemas/tools/observe_javascript_runtime.json index 1694926a52..9d8be1a7fa 100644 --- a/scripts/verify/advertised-schemas/tools/observe_javascript_runtime.json +++ b/scripts/verify/advertised-schemas/tools/observe_javascript_runtime.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "0b19d55284a3a83d", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/observe_native_calls.json b/scripts/verify/advertised-schemas/tools/observe_native_calls.json index 07b9cde71b..5d1889f96f 100644 --- a/scripts/verify/advertised-schemas/tools/observe_native_calls.json +++ b/scripts/verify/advertised-schemas/tools/observe_native_calls.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "66da388cb3838500", - "output compact": "fc6c5d5a78a47254" + "input compact": "5be18550d8c578a1", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^[^\\x00\\x09-\\x0d \\[\\]]+$", "^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/observe_native_ui.json b/scripts/verify/advertised-schemas/tools/observe_native_ui.json index e9c1c33c4e..f1a63d11e7 100644 --- a/scripts/verify/advertised-schemas/tools/observe_native_ui.json +++ b/scripts/verify/advertised-schemas/tools/observe_native_ui.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "ef74c2046f0c6373", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/observe_web_execution.json b/scripts/verify/advertised-schemas/tools/observe_web_execution.json index a32bfb640f..57959dbcd0 100644 --- a/scripts/verify/advertised-schemas/tools/observe_web_execution.json +++ b/scripts/verify/advertised-schemas/tools/observe_web_execution.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "eab15d9712a91afa", - "output compact": "d2b94d1517ad80ea" + "output compact": "e345f0377ecbe795" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/observe_web_session.json b/scripts/verify/advertised-schemas/tools/observe_web_session.json index f95a9fd64e..38cb912862 100644 --- a/scripts/verify/advertised-schemas/tools/observe_web_session.json +++ b/scripts/verify/advertised-schemas/tools/observe_web_session.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "0478cf5e0e6a0ea3", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/open_binary.json b/scripts/verify/advertised-schemas/tools/open_binary.json index 142632754e..52e4aaeacc 100644 --- a/scripts/verify/advertised-schemas/tools/open_binary.json +++ b/scripts/verify/advertised-schemas/tools/open_binary.json @@ -1,13 +1,13 @@ { "schemas": { - "input compact": "4c5517930a6c0f42", + "input compact": "a0c34236cf1c8487", "output compact": "9cda19dfa1310afa" }, "patterns": { "input": [ + "^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", "^0x[0-9A-Fa-f]{1,16}$", "^0x[0-9A-Fa-f]{1,8}$", - "^[^\\x00]*$", "^[a-z][\\-0-9a-z]*$" ] } diff --git a/scripts/verify/advertised-schemas/tools/open_bundle_resources.json b/scripts/verify/advertised-schemas/tools/open_bundle_resources.json index d89f9b1c47..0edf5224bf 100644 --- a/scripts/verify/advertised-schemas/tools/open_bundle_resources.json +++ b/scripts/verify/advertised-schemas/tools/open_bundle_resources.json @@ -1,10 +1,10 @@ { "schemas": { - "input compact": "18d266261424a97c", + "input compact": "88c419670dc83b73", "output compact": "57c40955388cd718" }, "patterns": { - "input": ["^[^\\x00]*$"], + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], "output": ["^[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/open_jeb_project.json b/scripts/verify/advertised-schemas/tools/open_jeb_project.json index ea69991dc3..0873a29066 100644 --- a/scripts/verify/advertised-schemas/tools/open_jeb_project.json +++ b/scripts/verify/advertised-schemas/tools/open_jeb_project.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "18d266261424a97c", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/prev_address.json b/scripts/verify/advertised-schemas/tools/prev_address.json index 966ce2cdbf..c8eed36dd9 100644 --- a/scripts/verify/advertised-schemas/tools/prev_address.json +++ b/scripts/verify/advertised-schemas/tools/prev_address.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "c3e7279c968e665b", - "output compact": "8e073f5fb72b5a75" + "output compact": "eb88868dbb05b21e" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/procedure_address.json b/scripts/verify/advertised-schemas/tools/procedure_address.json index 5dcba0f477..7eb11d51f3 100644 --- a/scripts/verify/advertised-schemas/tools/procedure_address.json +++ b/scripts/verify/advertised-schemas/tools/procedure_address.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "e91653898083fedc", - "output compact": "3f0bd2ea1eff0173" + "output compact": "59263967ecc2a682" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/procedure_assembly.json b/scripts/verify/advertised-schemas/tools/procedure_assembly.json index 58dbcb0881..c81e3b3c7f 100644 --- a/scripts/verify/advertised-schemas/tools/procedure_assembly.json +++ b/scripts/verify/advertised-schemas/tools/procedure_assembly.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "c93184eb12436c88", - "output compact": "8e073f5fb72b5a75" + "output compact": "eb88868dbb05b21e" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/procedure_callees.json b/scripts/verify/advertised-schemas/tools/procedure_callees.json index c4dfe87bb4..eaa2f0c781 100644 --- a/scripts/verify/advertised-schemas/tools/procedure_callees.json +++ b/scripts/verify/advertised-schemas/tools/procedure_callees.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "e91653898083fedc", - "output compact": "5b53ae80a71c76b8" + "output compact": "c046ae126d3e31f4" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/procedure_callers.json b/scripts/verify/advertised-schemas/tools/procedure_callers.json index c4dfe87bb4..eaa2f0c781 100644 --- a/scripts/verify/advertised-schemas/tools/procedure_callers.json +++ b/scripts/verify/advertised-schemas/tools/procedure_callers.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "e91653898083fedc", - "output compact": "5b53ae80a71c76b8" + "output compact": "c046ae126d3e31f4" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/procedure_info.json b/scripts/verify/advertised-schemas/tools/procedure_info.json index 4546908c2a..e65a5f5719 100644 --- a/scripts/verify/advertised-schemas/tools/procedure_info.json +++ b/scripts/verify/advertised-schemas/tools/procedure_info.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "c93184eb12436c88", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/procedure_pseudo_code.json b/scripts/verify/advertised-schemas/tools/procedure_pseudo_code.json index 5ba1b3fd73..cfb7052516 100644 --- a/scripts/verify/advertised-schemas/tools/procedure_pseudo_code.json +++ b/scripts/verify/advertised-schemas/tools/procedure_pseudo_code.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "7bd3d5206ada19ea", - "output compact": "88733f11ac8c9a26" + "output compact": "fc14c7f28c4cbbdf" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/procedure_references.json b/scripts/verify/advertised-schemas/tools/procedure_references.json index ee130b2aba..cc05937514 100644 --- a/scripts/verify/advertised-schemas/tools/procedure_references.json +++ b/scripts/verify/advertised-schemas/tools/procedure_references.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "07541a0e1a862339", - "output compact": "d2b94d1517ad80ea" + "output compact": "e345f0377ecbe795" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/project_android_application_graph.json b/scripts/verify/advertised-schemas/tools/project_android_application_graph.json index bbd9d19363..5ecfe4f2f5 100644 --- a/scripts/verify/advertised-schemas/tools/project_android_application_graph.json +++ b/scripts/verify/advertised-schemas/tools/project_android_application_graph.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "8bd5a02c5a9bd146", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/project_apple_application_graph.json b/scripts/verify/advertised-schemas/tools/project_apple_application_graph.json index bbd9d19363..5ecfe4f2f5 100644 --- a/scripts/verify/advertised-schemas/tools/project_apple_application_graph.json +++ b/scripts/verify/advertised-schemas/tools/project_apple_application_graph.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "8bd5a02c5a9bd146", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/project_harmony_application_graph.json b/scripts/verify/advertised-schemas/tools/project_harmony_application_graph.json index bbd9d19363..5ecfe4f2f5 100644 --- a/scripts/verify/advertised-schemas/tools/project_harmony_application_graph.json +++ b/scripts/verify/advertised-schemas/tools/project_harmony_application_graph.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "8bd5a02c5a9bd146", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/project_managed_application_graph.json b/scripts/verify/advertised-schemas/tools/project_managed_application_graph.json index fe330ca851..3fb4f01a49 100644 --- a/scripts/verify/advertised-schemas/tools/project_managed_application_graph.json +++ b/scripts/verify/advertised-schemas/tools/project_managed_application_graph.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "d5c857c05152bd62", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/pull_adb_file.json b/scripts/verify/advertised-schemas/tools/pull_adb_file.json index ca7e115484..76f1ae4a42 100644 --- a/scripts/verify/advertised-schemas/tools/pull_adb_file.json +++ b/scripts/verify/advertised-schemas/tools/pull_adb_file.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "da6ee35a3849c53b", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^/[^\\x00]*$", "^[^\\x00\\x09-\\x0d \"']+$", "^[^\\x00]*$"] + "input": ["^/[^\\x00]*$", "^[^\\x00\\x09-\\x0d \"']+$", "^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/pull_adb_package.json b/scripts/verify/advertised-schemas/tools/pull_adb_package.json index 4fb9d4a760..27a84353ad 100644 --- a/scripts/verify/advertised-schemas/tools/pull_adb_package.json +++ b/scripts/verify/advertised-schemas/tools/pull_adb_package.json @@ -1,13 +1,14 @@ { "schemas": { "input compact": "7f3087dd0cb3722b", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { "input": [ "^[A-Za-z][0-9A-Z_a-z]*(\\.[A-Za-z][0-9A-Z_a-z]*)*$", "^[^\\x00\\x09-\\x0d \"']+$", "^[^\\x00]*$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/push_adb_file.json b/scripts/verify/advertised-schemas/tools/push_adb_file.json index 156c1a34c1..aaedda9f8c 100644 --- a/scripts/verify/advertised-schemas/tools/push_adb_file.json +++ b/scripts/verify/advertised-schemas/tools/push_adb_file.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "09c89b1cb90f857b", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^/[^\\x00]*$", "^[^\\x00\\x09-\\x0d \"']+$", "^[^\\x00]*$"] + "input": ["^/[^\\x00]*$", "^[^\\x00\\x09-\\x0d \"']+$", "^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/read_adb_logcat.json b/scripts/verify/advertised-schemas/tools/read_adb_logcat.json index eca0ee5d1a..3ec34ae119 100644 --- a/scripts/verify/advertised-schemas/tools/read_adb_logcat.json +++ b/scripts/verify/advertised-schemas/tools/read_adb_logcat.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "0dff7f90efa0d080", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00\\x09-\\x0d \"']+$"] + "input": ["^[^\\x00\\x09-\\x0d \"']+$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/read_adb_setting.json b/scripts/verify/advertised-schemas/tools/read_adb_setting.json index 01a9c03518..b67351ac13 100644 --- a/scripts/verify/advertised-schemas/tools/read_adb_setting.json +++ b/scripts/verify/advertised-schemas/tools/read_adb_setting.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "ffd694dc45e55a70", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[\\-.0-9A-Z_a-z]+$", "^[^\\x00\\x09-\\x0d \"']+$"] + "input": ["^[\\-.0-9A-Z_a-z]+$", "^[^\\x00\\x09-\\x0d \"']+$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/read_bytes.json b/scripts/verify/advertised-schemas/tools/read_bytes.json index 92b626ec00..fb5e644aba 100644 --- a/scripts/verify/advertised-schemas/tools/read_bytes.json +++ b/scripts/verify/advertised-schemas/tools/read_bytes.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "1d829a751c1960a6", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/read_function_instructions.json b/scripts/verify/advertised-schemas/tools/read_function_instructions.json index 4546908c2a..e65a5f5719 100644 --- a/scripts/verify/advertised-schemas/tools/read_function_instructions.json +++ b/scripts/verify/advertised-schemas/tools/read_function_instructions.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "c93184eb12436c88", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/reconcile_javascript_runtime.json b/scripts/verify/advertised-schemas/tools/reconcile_javascript_runtime.json index 8846c7a028..5ccc94fc6f 100644 --- a/scripts/verify/advertised-schemas/tools/reconcile_javascript_runtime.json +++ b/scripts/verify/advertised-schemas/tools/reconcile_javascript_runtime.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "4754798b6a1df756", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/recover_javascript_sources.json b/scripts/verify/advertised-schemas/tools/recover_javascript_sources.json index 85b6247cfd..5f26523c83 100644 --- a/scripts/verify/advertised-schemas/tools/recover_javascript_sources.json +++ b/scripts/verify/advertised-schemas/tools/recover_javascript_sources.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "8ac2f60d560cb8e9", - "output compact": "fc6c5d5a78a47254" + "input compact": "c98e46c18ceb37e2", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/reset_investigation.json b/scripts/verify/advertised-schemas/tools/reset_investigation.json index bce0e43cac..54aa3f29d9 100644 --- a/scripts/verify/advertised-schemas/tools/reset_investigation.json +++ b/scripts/verify/advertised-schemas/tools/reset_investigation.json @@ -1,9 +1,9 @@ { "schemas": { - "input compact": "9fff69030d873c44", + "input compact": "2706aa51000f7c8b", "output compact": "0d2c6c6d5a286267" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"] } } diff --git a/scripts/verify/advertised-schemas/tools/resolve_adb_packages.json b/scripts/verify/advertised-schemas/tools/resolve_adb_packages.json index 69a28b7637..7ddd5d1173 100644 --- a/scripts/verify/advertised-schemas/tools/resolve_adb_packages.json +++ b/scripts/verify/advertised-schemas/tools/resolve_adb_packages.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "16856277f255380d", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00\\x09-\\x0d \"']+$"] + "input": ["^[^\\x00\\x09-\\x0d \"']+$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/resolve_containing_procedure.json b/scripts/verify/advertised-schemas/tools/resolve_containing_procedure.json index 58d40eca13..3efcc28e9d 100644 --- a/scripts/verify/advertised-schemas/tools/resolve_containing_procedure.json +++ b/scripts/verify/advertised-schemas/tools/resolve_containing_procedure.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "5ead352a637a24da", - "output compact": "d2b94d1517ad80ea" + "output compact": "e345f0377ecbe795" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/resolve_native_call_targets.json b/scripts/verify/advertised-schemas/tools/resolve_native_call_targets.json index 95aa9f24d7..6f0b19690b 100644 --- a/scripts/verify/advertised-schemas/tools/resolve_native_call_targets.json +++ b/scripts/verify/advertised-schemas/tools/resolve_native_call_targets.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "940657f284593726", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/rizin_debug_command.json b/scripts/verify/advertised-schemas/tools/rizin_debug_command.json index 9c5e6aa92f..7c3f904196 100644 --- a/scripts/verify/advertised-schemas/tools/rizin_debug_command.json +++ b/scripts/verify/advertised-schemas/tools/rizin_debug_command.json @@ -1,11 +1,12 @@ { "schemas": { "input compact": "c70e42c90db7a9f1", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { "input": [ "^([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-8][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/search_android_classes.json b/scripts/verify/advertised-schemas/tools/search_android_classes.json index 92d8d28b4d..0ef11350e9 100644 --- a/scripts/verify/advertised-schemas/tools/search_android_classes.json +++ b/scripts/verify/advertised-schemas/tools/search_android_classes.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "59b120ee57b1b0a6", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/search_bytes.json b/scripts/verify/advertised-schemas/tools/search_bytes.json index ef05b8bd49..d79571d4dc 100644 --- a/scripts/verify/advertised-schemas/tools/search_bytes.json +++ b/scripts/verify/advertised-schemas/tools/search_bytes.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "7f0fd8e904b80147", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/search_guidance.json b/scripts/verify/advertised-schemas/tools/search_guidance.json index 17026cc233..e9f41fee0f 100644 --- a/scripts/verify/advertised-schemas/tools/search_guidance.json +++ b/scripts/verify/advertised-schemas/tools/search_guidance.json @@ -1,7 +1,7 @@ { "schemas": { "input compact": "e08dca23a03ab73b", - "output compact": "85b6bc54bbcf784f" + "output compact": "8a0a089f86af8441" }, "patterns": {} } diff --git a/scripts/verify/advertised-schemas/tools/search_procedures.json b/scripts/verify/advertised-schemas/tools/search_procedures.json index f0a666e87a..14c0738d40 100644 --- a/scripts/verify/advertised-schemas/tools/search_procedures.json +++ b/scripts/verify/advertised-schemas/tools/search_procedures.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "9f4f41150e61f0dc", - "output compact": "42b0abc4695d01f1" + "output compact": "746a7e33520fa80a" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/search_strings.json b/scripts/verify/advertised-schemas/tools/search_strings.json index f0a666e87a..14c0738d40 100644 --- a/scripts/verify/advertised-schemas/tools/search_strings.json +++ b/scripts/verify/advertised-schemas/tools/search_strings.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "9f4f41150e61f0dc", - "output compact": "42b0abc4695d01f1" + "output compact": "746a7e33520fa80a" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/set_address_name.json b/scripts/verify/advertised-schemas/tools/set_address_name.json index 43cf367892..58d6c5a680 100644 --- a/scripts/verify/advertised-schemas/tools/set_address_name.json +++ b/scripts/verify/advertised-schemas/tools/set_address_name.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "8428dd5f2b08637f", - "output compact": "de9502db9fbcb913" + "output compact": "19103aa0b30418dd" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/set_addresses_names.json b/scripts/verify/advertised-schemas/tools/set_addresses_names.json index ba3e68cf25..d0cb7356e1 100644 --- a/scripts/verify/advertised-schemas/tools/set_addresses_names.json +++ b/scripts/verify/advertised-schemas/tools/set_addresses_names.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "9dabf376fc823a5d", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/set_bookmark.json b/scripts/verify/advertised-schemas/tools/set_bookmark.json index 14521f90aa..5dd5438cf6 100644 --- a/scripts/verify/advertised-schemas/tools/set_bookmark.json +++ b/scripts/verify/advertised-schemas/tools/set_bookmark.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "a24b2532fbf81d90", - "output compact": "de9502db9fbcb913" + "output compact": "19103aa0b30418dd" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/set_comment.json b/scripts/verify/advertised-schemas/tools/set_comment.json index a7eb82d187..5d2c100703 100644 --- a/scripts/verify/advertised-schemas/tools/set_comment.json +++ b/scripts/verify/advertised-schemas/tools/set_comment.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "f10575c521d53534", - "output compact": "de9502db9fbcb913" + "output compact": "19103aa0b30418dd" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/set_inline_comment.json b/scripts/verify/advertised-schemas/tools/set_inline_comment.json index a7eb82d187..5d2c100703 100644 --- a/scripts/verify/advertised-schemas/tools/set_inline_comment.json +++ b/scripts/verify/advertised-schemas/tools/set_inline_comment.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "f10575c521d53534", - "output compact": "de9502db9fbcb913" + "output compact": "19103aa0b30418dd" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/start_adb_activity.json b/scripts/verify/advertised-schemas/tools/start_adb_activity.json index eaf32c1691..8af75a26de 100644 --- a/scripts/verify/advertised-schemas/tools/start_adb_activity.json +++ b/scripts/verify/advertised-schemas/tools/start_adb_activity.json @@ -1,7 +1,7 @@ { "schemas": { "input compact": "5dcd84c87e77a7fd", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { "input": [ @@ -12,6 +12,7 @@ "^[^\\x00\\x09-\\x0d \"']+$", "^[^\\x00\\x09-\\x0d ]+$", "^[^\\x00]*$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/start_adb_app.json b/scripts/verify/advertised-schemas/tools/start_adb_app.json index c267aa3120..282c72ae8b 100644 --- a/scripts/verify/advertised-schemas/tools/start_adb_app.json +++ b/scripts/verify/advertised-schemas/tools/start_adb_app.json @@ -1,12 +1,13 @@ { "schemas": { "input compact": "2d6b5bb69d217de1", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { "input": [ "^[A-Za-z][0-9A-Z_a-z]*(\\.[A-Za-z][0-9A-Z_a-z]*)*$", "^[^\\x00\\x09-\\x0d \"']+$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/start_build_computer.json b/scripts/verify/advertised-schemas/tools/start_build_computer.json index b754876c84..67c47cbc2d 100644 --- a/scripts/verify/advertised-schemas/tools/start_build_computer.json +++ b/scripts/verify/advertised-schemas/tools/start_build_computer.json @@ -1,10 +1,13 @@ { "schemas": { - "input compact": "db227529ee2bc89a", + "input compact": "ab714ed8858504cc", "output compact": "e4fa205faaf0e82e" }, "patterns": { - "input": ["^[0-9A-Za-z][\\-.0-9A-Z_a-z]*$", "^[^\\x00]*$"], + "input": [ + "^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$", + "^[0-9A-Za-z][\\-.0-9A-Z_a-z]*$" + ], "output": [ "^([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-8][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" ] diff --git a/scripts/verify/advertised-schemas/tools/start_gdb_session.json b/scripts/verify/advertised-schemas/tools/start_gdb_session.json index 0aef84f8eb..50aad6d79d 100644 --- a/scripts/verify/advertised-schemas/tools/start_gdb_session.json +++ b/scripts/verify/advertised-schemas/tools/start_gdb_session.json @@ -1,10 +1,10 @@ { "schemas": { - "input compact": "3a4bca02d0a44fb8", + "input compact": "242cd1c7b30cc892", "output compact": "a14bf3365e44977e" }, "patterns": { - "input": ["^[^\\x00]*$"], + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], "output": [ "^([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-8][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" ] diff --git a/scripts/verify/advertised-schemas/tools/start_rizin_debug_session.json b/scripts/verify/advertised-schemas/tools/start_rizin_debug_session.json index d004a32d10..cbcb7b0442 100644 --- a/scripts/verify/advertised-schemas/tools/start_rizin_debug_session.json +++ b/scripts/verify/advertised-schemas/tools/start_rizin_debug_session.json @@ -1,10 +1,10 @@ { "schemas": { - "input compact": "ab6163e1a603d534", + "input compact": "26bab3db3e536c19", "output compact": "8679774ab9ec07a1" }, "patterns": { - "input": ["^[^\\x00]*$"], + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], "output": [ "^([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-8][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" ] diff --git a/scripts/verify/advertised-schemas/tools/stop_adb_app.json b/scripts/verify/advertised-schemas/tools/stop_adb_app.json index c267aa3120..282c72ae8b 100644 --- a/scripts/verify/advertised-schemas/tools/stop_adb_app.json +++ b/scripts/verify/advertised-schemas/tools/stop_adb_app.json @@ -1,12 +1,13 @@ { "schemas": { "input compact": "2d6b5bb69d217de1", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { "input": [ "^[A-Za-z][0-9A-Z_a-z]*(\\.[A-Za-z][0-9A-Z_a-z]*)*$", "^[^\\x00\\x09-\\x0d \"']+$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/stop_build_capture.json b/scripts/verify/advertised-schemas/tools/stop_build_capture.json index 3c72fc8d52..7e57e1620f 100644 --- a/scripts/verify/advertised-schemas/tools/stop_build_capture.json +++ b/scripts/verify/advertised-schemas/tools/stop_build_capture.json @@ -1,11 +1,14 @@ { "schemas": { "input compact": "3b3f0b6ed9a02890", - "output compact": "6ad23bedc3a584a2" + "output compact": "9973600e20afc7f6" }, "patterns": { "input": [ "^([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-8][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" + ], + "output": [ + "^([0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[1-8][0-9A-Fa-f]{3}-[89ABab][0-9A-Fa-f]{3}-[0-9A-Fa-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" ] } } diff --git a/scripts/verify/advertised-schemas/tools/trace_android_references.json b/scripts/verify/advertised-schemas/tools/trace_android_references.json index 5583f28368..f37479ede7 100644 --- a/scripts/verify/advertised-schemas/tools/trace_android_references.json +++ b/scripts/verify/advertised-schemas/tools/trace_android_references.json @@ -1,9 +1,10 @@ { "schemas": { "input compact": "fcfd3ff516c61616", - "output compact": "d2b94d1517ad80ea" + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/trace_application_feature.json b/scripts/verify/advertised-schemas/tools/trace_application_feature.json index dbd76b0d91..2f91c62ba9 100644 --- a/scripts/verify/advertised-schemas/tools/trace_application_feature.json +++ b/scripts/verify/advertised-schemas/tools/trace_application_feature.json @@ -1,7 +1,9 @@ { "schemas": { - "input compact": "6da6ada4587d6b1e", - "output compact": "fc6c5d5a78a47254" + "input compact": "2a24fa501a055242", + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/trace_call_path.json b/scripts/verify/advertised-schemas/tools/trace_call_path.json index ba4ddc50cd..780b8d8226 100644 --- a/scripts/verify/advertised-schemas/tools/trace_call_path.json +++ b/scripts/verify/advertised-schemas/tools/trace_call_path.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "34b3b956817a7a35", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/trace_dylib_resolution.json b/scripts/verify/advertised-schemas/tools/trace_dylib_resolution.json index 7168a23a34..7b9d1cc4c6 100644 --- a/scripts/verify/advertised-schemas/tools/trace_dylib_resolution.json +++ b/scripts/verify/advertised-schemas/tools/trace_dylib_resolution.json @@ -1,11 +1,12 @@ { "schemas": { "input compact": "fba037864c570ea9", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { "input": [ "^(?:[^\\x00.\\x2f\\\\][^\\x00\\x2f\\\\]*|\\.[^\\x00.\\x2f\\\\][^\\x00\\x2f\\\\]*|\\.\\.[^\\x00\\x2f\\\\]+)(?:/(?:[^\\x00.\\x2f\\\\][^\\x00\\x2f\\\\]*|\\.[^\\x00.\\x2f\\\\][^\\x00\\x2f\\\\]*|\\.\\.[^\\x00\\x2f\\\\]+))*$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/trace_feature.json b/scripts/verify/advertised-schemas/tools/trace_feature.json index 0650b8065f..79152147ab 100644 --- a/scripts/verify/advertised-schemas/tools/trace_feature.json +++ b/scripts/verify/advertised-schemas/tools/trace_feature.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "ef7bf3f41eddd3cd", - "output compact": "d2b94d1517ad80ea" + "output compact": "e345f0377ecbe795" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/trace_javascript_semantics.json b/scripts/verify/advertised-schemas/tools/trace_javascript_semantics.json index 3cee0aefe9..6770431925 100644 --- a/scripts/verify/advertised-schemas/tools/trace_javascript_semantics.json +++ b/scripts/verify/advertised-schemas/tools/trace_javascript_semantics.json @@ -1,7 +1,9 @@ { "schemas": { - "input compact": "86bc47efe9065d21", - "output compact": "fc6c5d5a78a47254" + "input compact": "5f97da5fe82202f6", + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/trace_native_ui_action.json b/scripts/verify/advertised-schemas/tools/trace_native_ui_action.json index 10053b1cd3..f5771af034 100644 --- a/scripts/verify/advertised-schemas/tools/trace_native_ui_action.json +++ b/scripts/verify/advertised-schemas/tools/trace_native_ui_action.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "5f7e5def746a8c3d", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/trace_native_values.json b/scripts/verify/advertised-schemas/tools/trace_native_values.json index c861e14b77..ed88ef32ee 100644 --- a/scripts/verify/advertised-schemas/tools/trace_native_values.json +++ b/scripts/verify/advertised-schemas/tools/trace_native_values.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "95e63e507a5480b2", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/trace_web_module_imports.json b/scripts/verify/advertised-schemas/tools/trace_web_module_imports.json index a396a399b5..1ac702b352 100644 --- a/scripts/verify/advertised-schemas/tools/trace_web_module_imports.json +++ b/scripts/verify/advertised-schemas/tools/trace_web_module_imports.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "62a36a8847614d47", - "output compact": "fc6c5d5a78a47254" + "input compact": "3fe5e88912dde914", + "output compact": "4babf3ed292a48aa" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/trace_web_source_location.json b/scripts/verify/advertised-schemas/tools/trace_web_source_location.json index 30abd90a47..f806c9551e 100644 --- a/scripts/verify/advertised-schemas/tools/trace_web_source_location.json +++ b/scripts/verify/advertised-schemas/tools/trace_web_source_location.json @@ -1,9 +1,10 @@ { "schemas": { - "input compact": "a0239c9f31bd11d9", - "output compact": "d2b94d1517ad80ea" + "input compact": "0bbf18fb20a8ea72", + "output compact": "e345f0377ecbe795" }, "patterns": { - "input": ["^[^\\x00]*$"] + "input": ["^(?:[\\x2f\\\\]|[A-Za-z]:[\\x2f\\\\])[^\\x00]*$"], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/uninstall_adb_package.json b/scripts/verify/advertised-schemas/tools/uninstall_adb_package.json index c267aa3120..282c72ae8b 100644 --- a/scripts/verify/advertised-schemas/tools/uninstall_adb_package.json +++ b/scripts/verify/advertised-schemas/tools/uninstall_adb_package.json @@ -1,12 +1,13 @@ { "schemas": { "input compact": "2d6b5bb69d217de1", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, "patterns": { "input": [ "^[A-Za-z][0-9A-Z_a-z]*(\\.[A-Za-z][0-9A-Z_a-z]*)*$", "^[^\\x00\\x09-\\x0d \"']+$" - ] + ], + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] } } diff --git a/scripts/verify/advertised-schemas/tools/unset_bookmark.json b/scripts/verify/advertised-schemas/tools/unset_bookmark.json index 50b2abdffe..eba71c882a 100644 --- a/scripts/verify/advertised-schemas/tools/unset_bookmark.json +++ b/scripts/verify/advertised-schemas/tools/unset_bookmark.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "940657f284593726", - "output compact": "de9502db9fbcb913" + "output compact": "19103aa0b30418dd" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/update_analysis_settings.json b/scripts/verify/advertised-schemas/tools/update_analysis_settings.json index 36f6af7186..5e31182366 100644 --- a/scripts/verify/advertised-schemas/tools/update_analysis_settings.json +++ b/scripts/verify/advertised-schemas/tools/update_analysis_settings.json @@ -1,7 +1,7 @@ { "schemas": { - "input compact": "9d4e260b7995138e", - "output compact": "39446aa1012006cc" + "input compact": "27b2f4a780efc42b", + "output compact": "5ca29dbeaeff3b0c" }, "patterns": {} } diff --git a/scripts/verify/advertised-schemas/tools/verify_managed_native_boundaries.json b/scripts/verify/advertised-schemas/tools/verify_managed_native_boundaries.json index 3c3a38538e..00b9556193 100644 --- a/scripts/verify/advertised-schemas/tools/verify_managed_native_boundaries.json +++ b/scripts/verify/advertised-schemas/tools/verify_managed_native_boundaries.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "f4961d6d2c882220", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/verify_reconstruction.json b/scripts/verify/advertised-schemas/tools/verify_reconstruction.json index effad1dc34..876aa28d82 100644 --- a/scripts/verify/advertised-schemas/tools/verify_reconstruction.json +++ b/scripts/verify/advertised-schemas/tools/verify_reconstruction.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "da8526d331f2620e", - "output compact": "fc6c5d5a78a47254" + "output compact": "4babf3ed292a48aa" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/scripts/verify/advertised-schemas/tools/xrefs.json b/scripts/verify/advertised-schemas/tools/xrefs.json index a49a420ce4..0709400e9c 100644 --- a/scripts/verify/advertised-schemas/tools/xrefs.json +++ b/scripts/verify/advertised-schemas/tools/xrefs.json @@ -1,7 +1,9 @@ { "schemas": { "input compact": "ad6deeb69e540106", - "output compact": "5b53ae80a71c76b8" + "output compact": "c046ae126d3e31f4" }, - "patterns": {} + "patterns": { + "output": ["^[^\\x00]*$", "^ev_[0-9a-f]{64}$"] + } } diff --git a/src/contracts/advertisedAllOf.ts b/src/contracts/advertisedAllOf.ts new file mode 100644 index 0000000000..175e8026e9 --- /dev/null +++ b/src/contracts/advertisedAllOf.ts @@ -0,0 +1,139 @@ +import { isDeepStrictEqual } from "node:util"; + +import { isRecord } from "../kernel/isRecord.js"; + +// Hoisting `allOf` members for the portable advertised dialect, which has no +// `allOf`. Every merge is exact or widening; see `advertisedDialectProjection`. + +type Schema = Record; + +const isStringList = (value: unknown): value is readonly string[] => + Array.isArray(value) && value.every((item) => typeof item === "string"); + +// A full-match pattern over one negated class, such as `^[^\x00]*$`. +const NEGATED_CLASS_PATTERN = /^\^\[\^((?:\\.|[^\]\\])+)\]([*+])\$$/u; + +/** + * A literal `-` at either end of a class body could form a range once two + * bodies are joined: `[^a-]` and `[^z]` would become `[^a-z]`. Declining + * such a join, even of an escaped `\-`, only leaves the rule to guidance. + */ +const hasEdgeHyphen = (body: string): boolean => + body.startsWith("-") || body.endsWith("-"); + +/** + * One pattern matching exactly the strings both match, or undefined. Two + * negated classes conjoin into one class; the portable dialect has no + * look-around to conjoin other patterns. + */ +const conjoinedPattern = (left: string, right: string): string | undefined => { + const first = NEGATED_CLASS_PATTERN.exec(left); + const second = NEGATED_CLASS_PATTERN.exec(right); + if ( + first?.[1] === undefined || + second?.[1] === undefined || + hasEdgeHyphen(first[1]) || + hasEdgeHyphen(second[1]) + ) + return undefined; + const repeat = first[2] === "+" || second[2] === "+" ? "+" : "*"; + return `^[^${first[1]}${second[1]}]${repeat}$`; +}; + +/** Conjoined bounds keep the tighter value, which is exact. */ +const TIGHTER_BOUND: Readonly< + Record number> +> = { + minimum: Math.max, + exclusiveMinimum: Math.max, + minLength: Math.max, + minItems: Math.max, + maximum: Math.min, + exclusiveMaximum: Math.min, + maxLength: Math.min, + maxItems: Math.min, +}; + +/** + * Hoist `allOf` members into their parent. Required names unite, bounds keep + * the tighter value and negated-class patterns conjoin, all exactly. Any other + * keyword the parent already sets differently is dropped, which only widens + * the advertisement; a dropped pattern is named in `dropped`. + */ +export const mergeAllOf = ( + schema: Schema, + dropped: (pattern: string) => void, +): Schema => { + if (!Array.isArray(schema.allOf)) return schema; + const { allOf, ...merged } = schema; + const tails = new Map(); + for (const key of TUPLE_TAIL_KEYS) + if (isTupleTail(merged, key)) tails.set(key, merged); + for (const member of allOf) { + if (!isRecord(member)) continue; + const flattened = mergeAllOf(member, dropped); + for (const [key, value] of Object.entries(flattened)) { + if (!Object.hasOwn(merged, key)) { + merged[key] = value; + if (isTupleTail(flattened, key)) tails.set(key, flattened); + } else conjoinKeyword(merged, key, value, dropped); + } + } + // A closed object's properties and patterns are scoped to its own schema + // object. Hoisting its closure beside another member's properties can + // reject names accepted by the original conjunction. + delete merged.additionalProperties; + // A tuple tail applies past its own object's positions. Beside a different + // number of positions it would constrain elements the original did not. + for (const [key, owner] of tails) + if (tuplePositions(owner)?.length !== tuplePositions(merged)?.length) + delete merged[key]; + return merged; +}; + +/** Conjoin a keyword both the parent and an `allOf` member set. */ +const conjoinKeyword = ( + merged: Schema, + key: string, + value: unknown, + dropped: (pattern: string) => void, +): void => { + const current = merged[key]; + if (isDeepStrictEqual(current, value)) return; + const tighter = TIGHTER_BOUND[key]; + if (key === "required" && isStringList(current) && isStringList(value)) + merged.required = [...new Set([...current, ...value])]; + else if ( + tighter !== undefined && + typeof current === "number" && + typeof value === "number" + ) + merged[key] = tighter(current, value); + else if ( + key === "pattern" && + typeof current === "string" && + typeof value === "string" + ) { + const conjoined = conjoinedPattern(current, value); + if (conjoined === undefined) dropped(value); + else merged.pattern = conjoined; + } +}; + +/** Keywords that constrain only the elements past a tuple's positions. */ +const TUPLE_TAIL_KEYS = ["items", "additionalItems"] as const; + +/** Positional element schemas (2020-12 `prefixItems` or draft-07 `items`). */ +const tuplePositions = (schema: Schema): readonly unknown[] | undefined => + Array.isArray(schema.prefixItems) + ? schema.prefixItems + : Array.isArray(schema.items) + ? schema.items + : undefined; + +/** Whether `key` constrains only the elements past `schema`'s positions. */ +const isTupleTail = (schema: Schema, key: string): boolean => + (key === "additionalItems" && Array.isArray(schema.items)) || + (key === "items" && + Array.isArray(schema.prefixItems) && + !Array.isArray(schema.items)); diff --git a/src/contracts/advertisedDialect.ts b/src/contracts/advertisedDialect.ts index b305b9c347..39e2d949c4 100644 --- a/src/contracts/advertisedDialect.ts +++ b/src/contracts/advertisedDialect.ts @@ -97,12 +97,13 @@ const TOOL_DESCRIPTION_LIMIT = 4096; export const ADVERTISED_DESCRIPTION_MAX_CHARACTERS = 1024; /** llama.cpp grammars fail at length and item bounds of this value or more. */ export const ADVERTISED_BOUND_LIMIT = 1999; -// Moonshot's function-calling API rejects requests while any single tool -// parameters schema exceeds its literal serialized size cap. Community -// measurements bound the cap between ~13.7 KB (accepted) and ~15 KB -// (rejected); 13 KiB leaves margin under the lower bound. See -// https://github.com/morluto/rea/issues/1484 for the measured evidence. -export const ADVERTISED_INPUT_SCHEMA_MAX_BYTES = 13 * 1024; +// The smallest per-tool input schema size a client acts on. Codex compacts +// any MCP input schema above 5,000 serialized bytes +// (DEFAULT_COMPACT_TOOL_SCHEMA_BYTES in codex-rs/tools/src/json_schema/ +// compaction.rs), dropping descriptions and nested structure first. Moonshot +// rejects a request above a larger cap, measured between ~13.7 KB and ~15 KB +// (https://github.com/morluto/rea/issues/1484), so this budget satisfies both. +export const ADVERTISED_INPUT_SCHEMA_MAX_BYTES = 5_000; // ---- Portable regex grammar ------------------------------------------------- // diff --git a/src/contracts/advertisedDialectProjection.test.ts b/src/contracts/advertisedDialectProjection.test.ts index 162b65609f..4a4b115fc7 100644 --- a/src/contracts/advertisedDialectProjection.test.ts +++ b/src/contracts/advertisedDialectProjection.test.ts @@ -49,6 +49,18 @@ it("does not move a closed allOf member's property scope onto another member", ( ); }); +it("does not join negated classes into a range neither member declared", () => { + // `[^a-]` and `[^z]` both admit `b`; joined raw they would form `[^a-z]`. + const properties = expectWidening( + { + type: "string", + allOf: [{ pattern: "^[^a-]*$" }, { pattern: "^[^z]*$" }], + }, + ["b", "bb"], + ); + expect(properties.value).not.toHaveProperty("pattern", "^[^a-z]*$"); +}); + it("does not move an allOf member's tuple tail beside other positions", () => { expectWidening( { @@ -134,12 +146,21 @@ describe("portable advertised dialect projection", () => { { type: "number", minimum: 0.5 }, ], [ - "pattern-only allOf members", + "negated-class allOf patterns as one class", { type: "string", - allOf: [{ pattern: "^a[a-z]*$" }, { pattern: "^[a-z]*b$" }], + allOf: [{ pattern: "^[^\\x00]*$" }, { pattern: "^[^\\x0a]+$" }], }, - { type: "string", pattern: "^a[a-z]*$" }, + { type: "string", pattern: "^[^\\x00\\x0a]+$" }, + ], + [ + "allOf bounds as the tighter bound", + { + type: "integer", + maximum: 20, + allOf: [{ minimum: 1 }, { minimum: 3, maximum: 9 }], + }, + { type: "integer", minimum: 3, maximum: 9 }, ], [ "pattern in its portable form", @@ -272,6 +293,28 @@ it("moves the root description and dropped cross-field constraints to tool guida ).toEqual([]); }); +it("names constraints the dialect cannot carry in tool guidance", () => { + const projection = project({ + name: { + type: "string", + allOf: [{ pattern: "^a[a-z]*$" }, { pattern: "^[a-z]*b$" }], + }, + offset: { type: "integer", minimum: 0, multipleOf: 4096 }, + query: { type: "string", maxLength: 8192 }, + budget: { type: "number", exclusiveMinimum: 0 }, + }); + expect(projection.schema).toHaveProperty( + "properties.name.pattern", + "^a[a-z]*$", + ); + expect(projection.guidance).toEqual([ + "`name` must also match the pattern ^[a-z]*b$.", + "`offset` must be a multiple of 4096.", + "`query` must have at most 8192 characters.", + "`budget` must be greater than 0.", + ]); +}); + it("bounds nested descriptions without splitting a surrogate pair", () => { const description = `${"x".repeat(1022)}😀tail`; const { schema } = project({ value: { type: "string", description } }); diff --git a/src/contracts/advertisedDialectProjection.ts b/src/contracts/advertisedDialectProjection.ts index 1f63a77a31..8e8bc41acf 100644 --- a/src/contracts/advertisedDialectProjection.ts +++ b/src/contracts/advertisedDialectProjection.ts @@ -7,6 +7,7 @@ import { ADVERTISED_DESCRIPTION_MAX_CHARACTERS, } from "./advertisedDialect.js"; import { projectPortablePattern } from "./portablePattern.js"; +import { mergeAllOf } from "./advertisedAllOf.js"; // The one projection from a self-contained (reference-free) input schema into // the portable advertised dialect declared in `advertisedDialect.ts`. Every @@ -65,6 +66,36 @@ export const dependencyGuidance = ( ); }; +/** A default stated in guidance is a scalar or a short literal. */ +const DEFAULT_GUIDANCE_MAX_BYTES = 64; + +/** + * One sentence naming the defaults of root properties, which the portable + * dialect does not carry. `resolve` follows a property reference when the + * schema still has them. + */ +export const defaultGuidance = ( + schema: Readonly>, + resolve: (property: unknown) => unknown = (property) => property, +): readonly string[] => { + if (!isRecord(schema.properties)) return []; + const defaults = Object.entries(schema.properties).flatMap( + ([name, property]) => { + const own = isRecord(property) ? property : undefined; + const declared = + own !== undefined && Object.hasOwn(own, "default") + ? own + : resolve(property); + if (!isRecord(declared) || !Object.hasOwn(declared, "default")) return []; + const text = JSON.stringify(declared.default); + return text !== undefined && text.length <= DEFAULT_GUIDANCE_MAX_BYTES + ? [`${name}=${text}`] + : []; + }, + ); + return defaults.length === 0 ? [] : [`Defaults: ${defaults.join(", ")}.`]; +}; + const truncatedDescription = (text: string): string => { if (text.length <= ADVERTISED_DESCRIPTION_MAX_CHARACTERS) return text; let kept = text.slice(0, ADVERTISED_DESCRIPTION_MAX_CHARACTERS - 1); @@ -73,60 +104,6 @@ const truncatedDescription = (text: string): string => { return `${kept}…`; }; -/** - * Hoist `allOf` members into their parent. A keyword the parent already sets - * differently is dropped, which only widens the advertisement; required names - * are a conjunction, so their union is exact. - */ -const mergeAllOf = (schema: Schema): Schema => { - if (!Array.isArray(schema.allOf)) return schema; - const { allOf, ...merged } = schema; - const tails = new Map(); - for (const key of TUPLE_TAIL_KEYS) - if (isTupleTail(merged, key)) tails.set(key, merged); - for (const member of allOf) { - if (!isRecord(member)) continue; - const flattened = mergeAllOf(member); - for (const [key, value] of Object.entries(flattened)) { - if (!Object.hasOwn(merged, key)) { - merged[key] = value; - if (isTupleTail(flattened, key)) tails.set(key, flattened); - } else if (key === "required" && isStringList(merged.required)) { - if (isStringList(value)) - merged.required = [...new Set([...merged.required, ...value])]; - } - } - } - // A closed object's properties and patterns are scoped to its own schema - // object. Hoisting its closure beside another member's properties can - // reject names accepted by the original conjunction. - delete merged.additionalProperties; - // A tuple tail applies past its own object's positions. Beside a different - // number of positions it would constrain elements the original did not. - for (const [key, owner] of tails) - if (tuplePositions(owner)?.length !== tuplePositions(merged)?.length) - delete merged[key]; - return merged; -}; - -/** Keywords that constrain only the elements past a tuple's positions. */ -const TUPLE_TAIL_KEYS = ["items", "additionalItems"] as const; - -/** Positional element schemas (2020-12 `prefixItems` or draft-07 `items`). */ -const tuplePositions = (schema: Schema): readonly unknown[] | undefined => - Array.isArray(schema.prefixItems) - ? schema.prefixItems - : Array.isArray(schema.items) - ? schema.items - : undefined; - -/** Whether `key` constrains only the elements past `schema`'s positions. */ -const isTupleTail = (schema: Schema, key: string): boolean => - (key === "additionalItems" && Array.isArray(schema.items)) || - (key === "items" && - Array.isArray(schema.prefixItems) && - !Array.isArray(schema.items)); - const branchType = (branch: unknown): string | undefined => isRecord(branch) && typeof branch.type === "string" ? branch.type : undefined; @@ -145,7 +122,11 @@ const label = (path: string): string => path === "" ? "The input" : `\`${path}\``; /** Exclusive numeric bounds become inclusive: exact for integers. */ -const inclusiveBounds = (source: Schema, out: Schema): void => { +const inclusiveBounds = ( + source: Schema, + out: Schema, + note: (rule: string) => void, +): void => { const { type } = source; const integral = type === "integer" || @@ -154,12 +135,14 @@ const inclusiveBounds = (source: Schema, out: Schema): void => { !type.includes("number")); let { minimum, maximum } = source; if (typeof source.exclusiveMinimum === "number") { + if (!integral) note(`must be greater than ${source.exclusiveMinimum}`); const lower = integral ? Math.floor(source.exclusiveMinimum) + 1 : source.exclusiveMinimum; minimum = typeof minimum === "number" ? Math.max(minimum, lower) : lower; } if (typeof source.exclusiveMaximum === "number") { + if (!integral) note(`must be less than ${source.exclusiveMaximum}`); const upper = integral ? Math.ceil(source.exclusiveMaximum) - 1 : source.exclusiveMaximum; @@ -171,19 +154,35 @@ const inclusiveBounds = (source: Schema, out: Schema): void => { out.maximum = maximum; }; -/** Length and item bounds clients can compile, and the portable pattern. */ -const scalarBounds = (source: Schema, out: Schema): void => { - for (const bound of ["minLength", "maxLength", "minItems", "maxItems"]) - if ( - Number.isSafeInteger(source[bound]) && - (source[bound] as number) < ADVERTISED_BOUND_LIMIT - ) - out[bound] = source[bound]; +const BOUND_RULES: Readonly> = { + minLength: "must have at least {} characters", + maxLength: "must have at most {} characters", + minItems: "must have at least {} entries", + maxItems: "must have at most {} entries", +}; + +/** + * Length and item bounds clients can compile, and the portable pattern. A + * bound or step the dialect cannot carry is stated through `note`. + */ +const scalarBounds = ( + source: Schema, + out: Schema, + note: (rule: string) => void, +): void => { + for (const [bound, rule] of Object.entries(BOUND_RULES)) { + const value = source[bound]; + if (!Number.isSafeInteger(value)) continue; + if ((value as number) < ADVERTISED_BOUND_LIMIT) out[bound] = value; + else note(rule.replace("{}", String(value))); + } + if (typeof source.multipleOf === "number") + note(`must be a multiple of ${source.multipleOf}`); if (typeof source.pattern === "string") { const projected = projectPortablePattern(source.pattern); if (projected.kind !== "unexpressible") out.pattern = projected.pattern; } - inclusiveBounds(source, out); + inclusiveBounds(source, out, note); }; /** Only non-empty string enums are portable; other literals keep a type. */ @@ -353,7 +352,9 @@ class DialectProjection { project(value: unknown, path: string): unknown { if (!isRecord(value)) return value; - const source = mergeAllOf(value); + const source = mergeAllOf(value, (pattern) => + this.note(`${label(path)} must also match the pattern ${pattern}.`), + ); const out: Schema = {}; if (typeof source.type === "string" || isStringList(source.type)) out.type = source.type; @@ -361,7 +362,7 @@ class DialectProjection { out.description = truncatedDescription(source.description); this.objectKeywords(source, out, path); this.arrayKeywords(source, out, path); - scalarBounds(source, out); + scalarBounds(source, out, (rule) => this.note(`${label(path)} ${rule}.`)); literalKeywords(source, out); if (isRecord(source.not) && isStringList(source.not.enum)) this.note( @@ -513,7 +514,10 @@ class DialectProjection { : branch; const projection = new DialectProjection(); const projected = projection.project(typed, path); - branchNotes.push(projection.notes); + // A rule about a value never constrains `null`, so a nullable + // value's rules still apply to every non-null alternative. + if (!isDeepStrictEqual(projected, { type: "null" })) + branchNotes.push(projection.notes); return isRecord(projected) && Array.isArray(projected.anyOf) && (onlyKeys(projected, ["anyOf"]) || @@ -543,6 +547,7 @@ export const projectToAdvertisedDialect = ( ? [description] : []), ...projection.notes, + ...defaultGuidance(root), ], }; }; diff --git a/src/contracts/analysisSettingsContracts.ts b/src/contracts/analysisSettingsContracts.ts index 500f885fa8..b0bfb7554a 100644 --- a/src/contracts/analysisSettingsContracts.ts +++ b/src/contracts/analysisSettingsContracts.ts @@ -1,6 +1,7 @@ import { analysisErrorProjectionSchema } from "../domain/analysisErrorProjectionSchema.js"; import { z } from "zod"; import { + analysisSettingDefinition, analysisSettingIds, analysisSettingIdSchema, analysisSettingValueSchema, @@ -38,14 +39,33 @@ const settingChangeSchema = z.discriminatedUnion("action", [ z.discriminatedUnion("setting", setSettingChangeSchemas), resetSettingChangeSchema, ]); -// Keep canonical JSON Schema flat so advertised input stays within the 10-level depth cap. -const flatSettingChangeUnion = z.union([ - ...setSettingChangeSchemas, - resetSettingChangeSchema, -]); +const nullableSettingIds = analysisSettingIds.filter( + (setting) => analysisSettingValueSchema(setting).safeParse(null).success, +); +// The JSON Schema form lists every setting ID in one enum. One union branch +// per setting's bounds serializes to about 8 KB, above the 5,000-byte input +// schema size at which Codex compacts a schema and drops the setting IDs. The +// parser above still enforces each setting's bounds and the set/reset value +// rule, and its refusal names the setting and its bounds. +const jsonSettingChangeSchema = z.strictObject({ + setting: analysisSettingIdSchema, + action: z.enum(["set", "reset"]), + value: z + .number() + .int() + .min( + Math.min( + ...analysisSettingIds.map( + (setting) => analysisSettingDefinition(setting).minimum, + ), + ), + ) + .nullable() + .optional(), +}); settingChangeSchema._zod.toJSONSchema = () => { const { $schema: _schema, ...schema } = z.toJSONSchema( - flatSettingChangeUnion, + jsonSettingChangeSchema, { target: "draft-2020-12", io: "input", reused: "inline" }, ); return schema; @@ -133,8 +153,7 @@ export const ANALYSIS_SETTINGS_TOOL_CONTRACTS = [ toolEffects({ mutatesSession: true }), ), kind: "application", - description: - "Atomically set or reset editable runtime defaults for new work. Changes survive target close/open but disappear on REA restart; reset restores launch configuration. Follow an error's named setting/bounds directly, then retry after work and cleanup settle; no inspection is needed when they are supplied. Does not change active work, edit files, restart providers, raise client limits or override explicit per-call arguments.", + description: `Atomically set or reset editable runtime defaults for new work. A set needs a value within that setting's minimum and maximum, as inspect_analysis_settings reports; a reset takes no value; only ${nullableSettingIds.join(" and ")} accept null. Changes survive target close/open but disappear on REA restart; reset restores launch configuration. Follow an error's named setting/bounds directly, then retry after work and cleanup settle; no inspection is needed when they are supplied. Does not change active work, edit files, restart providers, raise client limits or override explicit per-call arguments.`, inputSchema: updateAnalysisSettingsInputSchema, outputSchema: updateAnalysisSettingsResultSchema, examples: [ diff --git a/src/contracts/compactInputSchema.test.ts b/src/contracts/compactInputSchema.test.ts index 7c89cc4243..c7a814fdc3 100644 --- a/src/contracts/compactInputSchema.test.ts +++ b/src/contracts/compactInputSchema.test.ts @@ -103,9 +103,11 @@ describe("compact advertised input schema", () => { expect(presentation).toBe("inline"); // Root guidance and dependency prose move to the tool description. expect(schema.description).toBeUndefined(); + // Root defaults are named; nested field prose and defaults leave. expect(guidance).toEqual([ "Root group guidance stays.", "When limits is provided, also provide query.", + 'Defaults: query="seed".', ]); const query = (schema.properties as Record) .query as Record; @@ -734,6 +736,71 @@ describe("compact input schema budget and reduction", () => { expect(compacted.schema.required).toEqual(["before", "after"]); }); + it("keeps root names and types when scalar rules alone overflow the budget", () => { + const operations = Array.from( + { length: 1500 }, + (_, index) => `operation_${index}`, + ); + const { schema, presentation } = compactAdvertisedInputSchema( + { + type: "object", + properties: { + operation: { type: "string", enum: operations }, + count: { type: "integer", minimum: 1 }, + }, + required: ["operation"], + additionalProperties: false, + }, + ADVERTISED_INPUT_SCHEMA_MAX_BYTES, + ); + expect(presentation).toBe("reduced"); + expect(schema.required).toEqual(["operation"]); + expect(schema.properties).toEqual({ + operation: { type: "string" }, + count: { type: "integer" }, + }); + }); + + it("states the smallest example whose UTF-8 JSON fits the guidance budget", () => { + // 1,022 bytes of JSON: within the 1 KiB bound, though escaping the text + // again would count 1,026. + const fits = { query: "a".repeat(1010) }; + const { guidance } = compactAdvertisedInputSchema( + { + type: "object", + properties: { + query: { type: "string" }, + nested: oversizedPairSchema(), + }, + examples: [fits, { query: "é".repeat(600) }], + }, + 1024, + ); + expect(guidance).toContain(`Example arguments: ${JSON.stringify(fits)}`); + }); + + it("states defaults through each property's own reference scope", () => { + const { guidance } = compactAdvertisedInputSchema( + { + type: "object", + $defs: { mode: { type: "string", default: "root" } }, + properties: { + mode: { + $id: "https://example.test/mode.json", + $ref: "#/$defs/mode", + $defs: { + mode: { $ref: "#/$defs/chained" }, + chained: { type: "string", default: "local" }, + }, + }, + nested: oversizedPairSchema(), + }, + }, + 1024, + ); + expect(guidance).toContain('Defaults: mode="local".'); + }); + it("produces deterministic output for equal input", () => { const schema = { type: "object", @@ -979,15 +1046,13 @@ it.each(["child.json", "https://example.test/child.json"])( ); it("includes restored root identity in the compact byte budget", () => { - const result = compactAdvertisedInputSchema( - { - $id: `https://example.test/${"a".repeat(1024)}`, - type: "object", - properties: { value: { type: "number" } }, - }, - 512, - ); - expect(result.presentation).toBe("reduced"); + const canonical = { + $id: `https://example.test/${"a".repeat(1024)}`, + type: "object", + properties: { value: { type: "number" } }, + }; + expect(inlineWithinBudget(canonical, 512)).toBeUndefined(); + const result = compactAdvertisedInputSchema(canonical, 512); expect(serializedBytes(result.schema)).toBeLessThanOrEqual(512); expect(result.schema.properties).toEqual({ value: { type: "number" } }); }); @@ -998,7 +1063,6 @@ it("bounds an oversized root description while retaining an object input", () => { type: "object", description: "x".repeat(budget + 1), properties: {} }, budget, ); - expect(result.presentation).toBe("reduced"); expect(serializedBytes(result.schema)).toBeLessThanOrEqual(budget); const validate = new Ajv2020({ strict: false }).compile(result.schema); expect(validate({ value: "allowed" })).toBe(true); diff --git a/src/contracts/compactInputSchema.ts b/src/contracts/compactInputSchema.ts index 929474dc4a..ce5ce23b1f 100644 --- a/src/contracts/compactInputSchema.ts +++ b/src/contracts/compactInputSchema.ts @@ -2,13 +2,17 @@ import { ADVERTISED_INPUT_SCHEMA_MAX_BYTES, hasAdvertisedInputDialectViolation, } from "./advertisedDialect.js"; -import { projectToAdvertisedDialect } from "./advertisedDialectProjection.js"; +import { + defaultGuidance, + projectToAdvertisedDialect, +} from "./advertisedDialectProjection.js"; import { COMPACT_SCHEMA_MAX_DEPTH, inlineWithinBudget, isSchemaObject, pruneSchemaBeyondDepth, reduceToShallowProperties, + resolveRootProperty, schemaDepth, serializedBytes, } from "./compactJsonSchema.js"; @@ -33,6 +37,13 @@ export interface CompactedInputSchema { readonly guidance: readonly string[]; } +/** + * Work bound on inlining `$ref` dependencies before projection, separate from + * the advertised budget because projection and depth pruning shrink the + * expansion. A schema that expands beyond it is advertised in reduced form. + */ +const INPUT_EXPANSION_MAX_BYTES = 13 * 1024; + const INPUT_REDUCED_ANNOTATION = "Advertised in reduced form by the compact input schema profile; the server still validates complete canonical inputs."; @@ -66,6 +77,42 @@ const retainRootPropertyGuidance = ( return properties === undefined ? stripped : { ...stripped, properties }; }; +const INPUT_PRUNED_GUIDANCE = + "Nested fields past the advertised schema depth are omitted; the server validates the complete input."; + +/** The largest example a reduced or pruned schema states in guidance. */ +const EXAMPLE_GUIDANCE_MAX_BYTES = 1024; + +/** + * The smallest canonical example that fits the guidance budget, for a schema + * whose advertised structure omits fields an agent must otherwise discover by + * failing. + */ +const exampleGuidance = ( + schema: Record, +): readonly string[] => { + if (!Array.isArray(schema.examples)) return []; + // Measure the JSON text itself in UTF-8; serializing it again would count + // its escapes twice. + const [smallest] = schema.examples + .map((example) => JSON.stringify(example)) + .filter((text): text is string => typeof text === "string") + .map((text) => ({ text, bytes: Buffer.byteLength(text, "utf8") })) + .sort((left, right) => left.bytes - right.bytes); + return smallest !== undefined && smallest.bytes <= EXAMPLE_GUIDANCE_MAX_BYTES + ? [`Example arguments: ${smallest.text}`] + : []; +}; + +/** Root defaults from the canonical schema, which compaction strips. */ +const canonicalDefaultGuidance = ( + schema: Record, + references: JsonSchemaReferences, +): readonly string[] => + defaultGuidance(schema, (property) => + resolveRootProperty(property, references), + ); + /** * Render an advertised input schema within a per-schema byte budget for * providers that validate the literal serialized schema size. The complete @@ -77,7 +124,7 @@ export const compactAdvertisedInputSchema = ( budgetBytes: number, ): CompactedInputSchema => { const references = new JsonSchemaReferences(schema); - const expanded = inlineWithinBudget(schema, budgetBytes, { + const expanded = inlineWithinBudget(schema, INPUT_EXPANSION_MAX_BYTES, { stripAnnotations: true, references, }); @@ -87,6 +134,7 @@ export const compactAdvertisedInputSchema = ( : projectToAdvertisedDialect( retainRootPropertyGuidance(schema, expanded), ); + const defaults = canonicalDefaultGuidance(schema, references); if ( inline !== undefined && serializedBytes(inline.schema) <= budgetBytes && @@ -95,8 +143,12 @@ export const compactAdvertisedInputSchema = ( skipRootBounds: budgetBytes <= ADVERTISED_INPUT_SCHEMA_MAX_BYTES, }) ) - return { ...inline, presentation: "inline" }; - if (inline !== undefined && serializedBytes(inline.schema) <= budgetBytes) { + return { + ...inline, + guidance: [...inline.guidance, ...defaults], + presentation: "inline", + }; + if (inline !== undefined) { // Only the branches past the depth limit are elided; the rest of the // validation structure stays advertised instead of a whole reduction. const pruned = pruneSchemaBeyondDepth(inline.schema); @@ -110,15 +162,37 @@ export const compactAdvertisedInputSchema = ( ) return { schema: pruned, - guidance: inline.guidance, + guidance: [ + ...inline.guidance, + ...defaults, + INPUT_PRUNED_GUIDANCE, + ...exampleGuidance(schema), + ], presentation: "inline", }; } - const reduced = projectToAdvertisedDialect( - reduceToShallowProperties(schema, INPUT_REDUCED_ANNOTATION, references), - ); - if (serializedBytes(reduced.schema) <= budgetBytes) - return { ...reduced, presentation: "reduced" }; + // Scalar rules are a few bytes each, but a very large enum could still + // overflow; root property names, types and required fields come first. + for (const keepScalarRules of [true, false]) { + const reduced = projectToAdvertisedDialect( + reduceToShallowProperties( + schema, + INPUT_REDUCED_ANNOTATION, + references, + keepScalarRules, + ), + ); + if (serializedBytes(reduced.schema) <= budgetBytes) + return { + ...reduced, + guidance: [ + ...reduced.guidance, + ...defaults, + ...exampleGuidance(schema), + ], + presentation: "reduced", + }; + } // A future contract with an extreme root-property count still advertises // an honest, budget-fitting shape instead of an oversized one. return { diff --git a/src/contracts/compactJsonSchema.ts b/src/contracts/compactJsonSchema.ts index 2ca29f3b9b..5702df7c01 100644 --- a/src/contracts/compactJsonSchema.ts +++ b/src/contracts/compactJsonSchema.ts @@ -647,15 +647,92 @@ const reducedPropertyTypes = ( }; }; +/** + * A root property's schema at the end of its reference chain, each reference + * resolved in the scope of the schema that holds it, or undefined when one + * does not resolve. The hop bound also ends a reference cycle. + */ +export const resolveRootProperty = ( + value: unknown, + references: JsonSchemaReferences, +): unknown => { + let resolved = value; + let scope: JsonSchemaScope | undefined = references.rootScope; + for (let hops = 0; isSchemaObject(resolved) && hops < 8; hops++) { + scope = references.enter(resolved, scope); + if (scope === undefined || typeof resolved.$ref !== "string") break; + const target = references.resolve(scope, resolved.$ref); + if (target.kind !== "target") return undefined; + resolved = target.value; + } + return resolved; +}; + +/** Value rules a reduced scalar property keeps; each is a few bytes. */ +const SCALAR_RULE_KEYS = [ + "enum", + "const", + "pattern", + "minLength", + "maxLength", + "minimum", + "maximum", + "exclusiveMinimum", + "exclusiveMaximum", + "multipleOf", +] as const; +const SCALAR_TYPES: ReadonlySet = new Set([ + "string", + "integer", + "number", + "boolean", +]); + +const onlyScalarRules = (schema: unknown): schema is Record => + isSchemaObject(schema) && + Object.keys(schema).every((key) => + (SCALAR_RULE_KEYS as readonly string[]).includes(key), + ); + +/** + * The value rules of a scalar root property: its enum, pattern and bounds, + * including `allOf` members that hold only such rules. A reduced schema keeps + * them because an agent cannot discover them from the type alone; object and + * array structure is what the reduction omits. + */ +const scalarRules = ( + value: unknown, + references: JsonSchemaReferences, +): Record => { + const resolved = resolveRootProperty(value, references); + if ( + !isSchemaObject(resolved) || + typeof resolved.type !== "string" || + !SCALAR_TYPES.has(resolved.type) + ) + return {}; + const rules: Record = {}; + for (const key of SCALAR_RULE_KEYS) + if (Object.hasOwn(resolved, key)) rules[key] = resolved[key]; + if (Array.isArray(resolved.allOf)) { + const members = resolved.allOf.filter(onlyScalarRules); + if (members.length > 0) rules.allOf = members; + } + return rules; +}; + /** * Present only the root property shape with per-property guidance. Used for * schemas whose validation structure alone exceeds the compact budget; the - * canonical schema still rejects malformed calls server-side. + * canonical schema still rejects malformed calls server-side. Without + * `keepScalarRules`, properties keep only their types, for a schema whose + * scalar rules alone would not fit. */ export const reduceToShallowProperties = ( schema: Record, reducedAnnotation: string, references: JsonSchemaReferences = new JsonSchemaReferences(schema), + keepScalarRules = true, ): Record => { const properties = isSchemaObject(schema.properties) ? schema.properties : {}; const description = [ @@ -672,7 +749,11 @@ export const reduceToShallowProperties = ( : {}; return [ name, - { ...reducedPropertyTypes(value, references), ...description }, + { + ...reducedPropertyTypes(value, references), + ...(keepScalarRules ? scalarRules(value, references) : {}), + ...description, + }, ]; }), ); diff --git a/src/contracts/fridaToolContracts.ts b/src/contracts/fridaToolContracts.ts index 3c60bb48df..c19ba72246 100644 --- a/src/contracts/fridaToolContracts.ts +++ b/src/contracts/fridaToolContracts.ts @@ -77,6 +77,17 @@ const scriptOutput = z.strictObject({ }); /** Caller-facing Frida device, process, and instrumentation-session contracts. */ +// Cross-field rules a refinement enforces. Each is both the refusal and the +// root description the advertisement states, because no schema keyword +// carries it. +const FRIDA_DEVICE_RULE = + "Give at most one of device_id and remote; omit both to use the local device."; +const FRIDA_MODE_RULE = + "mode attach requires pid and rejects program and argv; mode spawn requires program and rejects pid."; +const FRIDA_SOURCE_RULE = + "source_kind inline requires source and rejects path; source_kind file requires path and rejects source."; +const FRIDA_INSTRUMENT_RULES = `${FRIDA_DEVICE_RULE} ${FRIDA_MODE_RULE} ${FRIDA_SOURCE_RULE}`; + export const FRIDA_TOOL_CONTRACTS = [ { name: "list_frida_devices", @@ -168,8 +179,9 @@ export const FRIDA_TOOL_CONTRACTS = [ value.program !== undefined && value.pid === undefined)) && !(value.device_id !== undefined && value.remote !== undefined), - "Select one device; attach requires pid; spawn requires program and rejects pid", - ), + `${FRIDA_DEVICE_RULE} ${FRIDA_MODE_RULE}`, + ) + .describe(`${FRIDA_DEVICE_RULE} ${FRIDA_MODE_RULE}`), outputSchema: fridaSessionObservationSchema, examples: [ { @@ -211,8 +223,9 @@ export const FRIDA_TOOL_CONTRACTS = [ (value.source_kind === "file" && value.path !== undefined && value.source === undefined), - "Inline source requires source; file source requires path", - ), + FRIDA_SOURCE_RULE, + ) + .describe(FRIDA_SOURCE_RULE), outputSchema: evidenceResultOf(scriptOutput), examples: [ { @@ -371,8 +384,9 @@ export const FRIDA_TOOL_CONTRACTS = [ (value.source_kind === "file" && value.path !== undefined && value.source === undefined)), - "Select one device and provide fields matching the mode and source_kind", - ), + FRIDA_INSTRUMENT_RULES, + ) + .describe(FRIDA_INSTRUMENT_RULES), outputSchema: evidenceResultOf( fridaSessionStatusSchema.extend({ source_kind: z.enum(["inline", "file"]), diff --git a/src/contracts/inputSchemaPresentation.ts b/src/contracts/inputSchemaPresentation.ts index 84d9bed181..698d2c896c 100644 --- a/src/contracts/inputSchemaPresentation.ts +++ b/src/contracts/inputSchemaPresentation.ts @@ -14,6 +14,15 @@ import { setOwnSchemaProperty, } from "./jsonSchemaKeywords.js"; +/** + * A fallback description for a property that has none, from its name and its + * own schema, or undefined. + */ +export type PropertyDescriber = ( + property: string, + schema: Readonly>, +) => string | undefined; + const referencedDescription = ( references: JsonSchemaReferences, schema: Readonly>, @@ -42,7 +51,7 @@ const describeSchema = ( schema: unknown, references: JsonSchemaReferences, inherited: JsonSchemaScope | undefined, - describeProperty: (property: string) => string | undefined, + describeProperty: PropertyDescriber, propertyDescription?: string, ): unknown => { if (!isObject(schema)) return schema; @@ -57,7 +66,7 @@ const describeSchema = ( const description = key === "properties" && isObject(child) ? (referencedDescription(references, child, scope) ?? - describeProperty(name)) + describeProperty(name, child)) : undefined; return [ name, @@ -463,7 +472,7 @@ const presentDiscriminatedRoot = ( */ export const presentInputJsonSchema = ( root: Record, - describeProperty: (property: string) => string | undefined, + describeProperty: PropertyDescriber, annotations: Pick = {}, ): Record => { const flattened = presentDiscriminatedRoot( diff --git a/src/contracts/propertyFallbackDescriptions.ts b/src/contracts/propertyFallbackDescriptions.ts new file mode 100644 index 0000000000..46a4e2b76a --- /dev/null +++ b/src/contracts/propertyFallbackDescriptions.ts @@ -0,0 +1,204 @@ +import { isRecord } from "../kernel/isRecord.js"; +import type { PropertyDescriber } from "./inputSchemaPresentation.js"; + +/** + * Fallback descriptions by property name, each for the JSON type it + * describes. A property of another type keeps no description rather than + * one written for a different field. `undefined` describes any type. + */ +const PROPERTY_DESCRIPTIONS: Readonly< + Record +> = { + addresses: [ + "array", + "Ordered provider-normalized procedure addresses to analyze.", + ], + after: [undefined, "The later or right-hand observation to compare."], + before: [undefined, "The earlier or left-hand observation to compare."], + boundary_id: [ + "string", + "Exact reconstruction boundary identifier to evaluate.", + ], + case_sensitive: [ + "boolean", + "Whether text matching distinguishes uppercase and lowercase.", + ], + cdp_endpoint: [ + "string", + "Literal loopback Chrome DevTools Protocol endpoint.", + ], + comment: ["string", "Exact analyst comment text to write."], + comparisons: ["array", "Validated comparison Evidence records to aggregate."], + coverage: ["object", "Exact reconstruction-coverage commitment to verify."], + direction: [ + "string", + "Direction in which to traverse or compare relationships.", + ], + document: ["string", "Exact provider document or program identity."], + error: [ + "object", + "Structured, caller-actionable error when the operation fails.", + ], + evidence: ["object", "Evidence record produced by this operation."], + evidence_id: [ + "string", + "Stable identifier of the recorded Evidence observation.", + ], + executable: ["string", "Command name or executable path to run."], + format: ["string", "Declared input artifact format."], + name: ["string", "Exact name used by this operation."], + pattern: [ + "string", + "Literal text or regular expression used to filter matching results.", + ], + phase: ["string", "Current plan or execution phase of the operation."], + plan: ["object", "Content-bound execution plan and its digest commitment."], + query: ["string", "Non-empty feature or text query to investigate."], + question: [ + "string", + "Concrete unresolved question to retain for later investigation.", + ], + result: [undefined, "Primary structured result returned by this operation."], + left: [undefined, "Left-hand input to compare."], + limits: [ + "object", + "Resource budgets that bound execution and retained output for this operation.", + ], + mode: ["string", "Operation mode that selects the requested behavior."], + overwrite: ["boolean", "Whether an existing destination may be replaced."], + path: ["string", "Local filesystem path used by this operation."], + provider_id: [ + "string", + "Exact deep-analysis provider ID, or automatic selection when omitted.", + ], + right: [undefined, "Right-hand input to compare."], + source_evidence: [ + "array", + "Evidence records supporting the prepared source transformation.", + ], + status: ["string", "Current lifecycle or verification status."], + summary: ["string", "Concise evidence-backed summary of the result."], + symbols: ["array", "Ordered Swift symbols to demangle."], + target_id: [ + "string", + "Exact CDP target identifier selected from the endpoint's target listing.", + ], + unknown_id: ["string", "Exact residual-unknown identifier."], +}; + +type JsonType = + | "string" + | "integer" + | "number" + | "boolean" + | "array" + | "object"; + +/** The one JSON type a property accepts besides null, or undefined. */ +const declaredType = ( + schema: Readonly>, +): JsonType | undefined => { + const branches = Array.isArray(schema.anyOf) + ? schema.anyOf + : Array.isArray(schema.oneOf) + ? schema.oneOf + : [schema]; + const types = new Set(); + for (const branch of branches) { + if (!isRecord(branch)) return undefined; + if (branch.type !== "null") types.add(branch.type); + } + const [type] = types; + return types.size === 1 && typeof type === "string" + ? (type as JsonType) + : undefined; +}; + +/** Name-derived fallbacks, each for the JSON types it describes. */ +const NAME_FALLBACKS: readonly (readonly [ + (property: string) => boolean, + readonly JsonType[], + (words: string) => string, +])[] = [ + [ + (name) => name.startsWith("max_"), + ["integer", "number"], + (words) => `Maximum permitted ${words.slice(4)} for this operation.`, + ], + [ + (name) => name.startsWith("include_"), + ["boolean"], + (words) => `Whether to include ${words.slice(8)} in the result.`, + ], + [ + (name) => name.startsWith("expected_"), + ["string", "integer", "number"], + (words) => + `Expected ${words.slice(9)} used to reject stale or mismatched input.`, + ], + [ + (name) => name.endsWith("_sha256"), + ["string"], + (words) => `Exact SHA-256 digest of ${words.slice(0, -7)}.`, + ], + [ + (name) => name.endsWith("_evidence_id"), + ["string"], + (words) => + `Exact Evidence identifier for the ${words.slice(0, -12)} observation.`, + ], + [ + (name) => name.endsWith("_evidence_ids"), + ["array"], + (words) => + `Ordered Evidence identifiers for the ${words.slice(0, -13)} observations.`, + ], + [ + (name) => name.endsWith("_path"), + ["string"], + (words) => `Local filesystem path for ${words.slice(0, -5)}.`, + ], + [ + (name) => name.endsWith("_uri"), + ["string"], + (words) => `Canonical URI for ${words.slice(0, -4)}.`, + ], + [ + (name) => name.endsWith("_bytes"), + ["integer", "number"], + (words) => `Byte count for ${words.slice(0, -6)}.`, + ], + [ + (name) => name.endsWith("_root") || name.endsWith("_roots"), + ["string", "array"], + (words) => `Local filesystem ${words} selected for this operation.`, + ], + [ + (name) => name.startsWith("is_") || name.startsWith("has_"), + ["boolean"], + (words) => `Whether ${words}.`, + ], +]; + +/** The fallback description for a property its contract left undescribed. */ +export const fallbackPropertyDescription: PropertyDescriber = ( + property, + schema, +) => { + const type = declaredType(schema); + const explicit = Object.hasOwn(PROPERTY_DESCRIPTIONS, property) + ? PROPERTY_DESCRIPTIONS[property] + : undefined; + if (explicit !== undefined) + return explicit[0] === undefined || explicit[0] === type + ? explicit[1] + : undefined; + const words = property.replaceAll("_", " "); + for (const [matches, types, describe] of NAME_FALLBACKS) + if (matches(property)) + return type !== undefined && types.includes(type) + ? describe(words) + : undefined; + // A generic sentence would only restate the property name in every schema. + return undefined; +}; diff --git a/src/contracts/toolSchemaMetadata.ts b/src/contracts/toolSchemaMetadata.ts index 7895b7ca88..92e9a6a004 100644 --- a/src/contracts/toolSchemaMetadata.ts +++ b/src/contracts/toolSchemaMetadata.ts @@ -7,6 +7,7 @@ import { z } from "zod"; import type { ToolContract } from "./toolContractTypes.js"; import { advertisedInputExamples } from "./advertisedInputExamples.js"; import { presentInputJsonSchema } from "./inputSchemaPresentation.js"; +import { fallbackPropertyDescription } from "./propertyFallbackDescriptions.js"; import { presentOutputJsonSchema } from "./outputSchemaPresentation.js"; import { schemaArrays, @@ -28,51 +29,6 @@ import { import { agentBudgetSummaryResultOf } from "../domain/agentResultBudget.js"; import { isAgentBudgetOperation } from "../domain/agentBudgetOperations.js"; -const PROPERTY_DESCRIPTIONS: Readonly> = { - addresses: "Ordered provider-normalized procedure addresses to analyze.", - after: "The later or right-hand observation to compare.", - before: "The earlier or left-hand observation to compare.", - boundary_id: "Exact reconstruction boundary identifier to evaluate.", - case_sensitive: - "Whether text matching distinguishes uppercase and lowercase.", - cdp_endpoint: "Literal loopback Chrome DevTools Protocol endpoint.", - comment: "Exact analyst comment text to write.", - comparisons: "Validated comparison Evidence records to aggregate.", - coverage: "Exact reconstruction-coverage commitment to verify.", - direction: "Direction in which to traverse or compare relationships.", - document: "Exact provider document or program identity.", - error: "Structured, caller-actionable error when the operation fails.", - evidence: "Evidence record produced by this operation.", - evidence_id: "Stable identifier of the recorded Evidence observation.", - executable: "Command name or executable path to run.", - format: "Declared input artifact format.", - name: "Exact name used by this operation.", - pattern: - "Literal text or regular expression used to filter matching results.", - phase: "Current plan or execution phase of the operation.", - plan: "Content-bound execution plan and its digest commitment.", - query: "Non-empty feature or text query to investigate.", - question: "Concrete unresolved question to retain for later investigation.", - result: "Primary structured result returned by this operation.", - left: "Left-hand input used for comparison or differential execution.", - limits: - "Resource budgets that bound execution and retained output for this operation.", - mode: "Operation mode that selects the requested behavior.", - overwrite: "Whether an existing destination may be replaced.", - path: "Local filesystem path used by this operation.", - provider_id: - "Exact deep-analysis provider ID, or automatic selection when omitted.", - right: "Right-hand input used for comparison or differential execution.", - source_evidence: - "Evidence records supporting the prepared source transformation.", - status: "Current lifecycle or verification status.", - summary: "Concise evidence-backed summary of the result.", - symbols: "Ordered Swift symbols to demangle.", - target_id: - "Exact CDP target identifier selected from the endpoint's target listing.", - unknown_id: "Exact residual-unknown identifier.", -}; - type JsonSchemaProjection = z.ZodType["~standard"]["jsonSchema"]["input"]; // Contracts are immutable module values. Build each advertised wrapper once so @@ -481,35 +437,3 @@ const memoizeByTarget = ( return projected; }; }; - -const fallbackPropertyDescription = (property: string): string | undefined => { - const explicit = Object.hasOwn(PROPERTY_DESCRIPTIONS, property) - ? PROPERTY_DESCRIPTIONS[property] - : undefined; - if (explicit !== undefined) return explicit; - const words = property.replaceAll("_", " "); - if (property.startsWith("max_")) - return `Maximum permitted ${words.slice(4)} for this operation.`; - if (property.startsWith("include_")) - return `Whether to include ${words.slice(8)} in the result.`; - if (property.startsWith("expected_")) - return `Expected ${words.slice(9)} used to reject stale or mismatched input.`; - if (property.endsWith("_sha256")) - return `Exact SHA-256 digest of ${words.slice(0, -7)}.`; - if (property.endsWith("_evidence_id")) - return `Exact Evidence identifier for the ${words.slice(0, -12)} observation.`; - if (property.endsWith("_evidence_ids")) - return `Ordered Evidence identifiers for the ${words.slice(0, -13)} observations.`; - if (property.endsWith("_path")) - return `Local filesystem path for ${words.slice(0, -5)}.`; - if (property.endsWith("_uri")) - return `Canonical URI for ${words.slice(0, -4)}.`; - if (property.endsWith("_bytes")) - return `Byte count for ${words.slice(0, -6)}.`; - if (property.endsWith("_root") || property.endsWith("_roots")) - return `Local filesystem ${words} selected for this operation.`; - if (property.startsWith("is_") || property.startsWith("has_")) - return `Whether ${words}.`; - // A generic sentence would only restate the property name in every schema. - return undefined; -}; diff --git a/src/domain/localPath.ts b/src/domain/localPath.ts index cc40495d4e..c0a573cc29 100644 --- a/src/domain/localPath.ts +++ b/src/domain/localPath.ts @@ -14,9 +14,13 @@ import { rejectUnpairedSurrogates } from "./stringPatterns.js"; * one advertised pattern cannot compile. See `offsetDateTimeSchema` for the * same hex-escape convention. */ +const NUL_PATH_MESSAGE = "Local filesystem paths cannot contain NUL"; +const UNPAIRED_SURROGATE_PATH_MESSAGE = + "Local filesystem paths must contain well-formed Unicode"; + export const nulFreeStringSchema = z .string() - .regex(/^[^\x00]*$/u, "Local filesystem paths cannot contain NUL"); + .regex(/^[^\x00]*$/u, NUL_PATH_MESSAGE); /** * A selected local filesystem path: nonempty, NUL-free, and representable @@ -25,7 +29,7 @@ export const nulFreeStringSchema = z */ export const localPathStringSchema = rejectUnpairedSurrogates( nulFreeStringSchema.min(1), - "Local filesystem paths must contain well-formed Unicode", + UNPAIRED_SURROGATE_PATH_MESSAGE, ); /** @@ -37,26 +41,53 @@ export const localPathStringSchema = rejectUnpairedSurrogates( export const windowsAbsolutePathPattern = /^(?:[\x5C\x2F]|[A-Za-z]:[\x5C\x2F])/u; +/** + * The absolute envelope over a NUL-free path, as one pattern. Two regex checks + * would serialize as `allOf` patterns, and the portable dialect can advertise + * only one pattern per string. + */ +const absoluteNulFreePathPattern = new RegExp( + `${windowsAbsolutePathPattern.source}[^\\x00]*$`, + "u", +); + /** * A caller-selected path that is absolute on the host running REA. * Advertise the host-independent envelope: choosing a regex on the build host * bakes that host's rules into the recorded CLI/MCP catalogs. Runtime admission * still uses the executing host's path rules, without serializing that choice. + * NUL is refused first, unadvertised, so its message is not "not absolute". */ -export const absoluteLocalPathStringSchema = localPathStringSchema - .regex(windowsAbsolutePathPattern, { - message: "must be an absolute local filesystem path", - abort: true, - }) - .superRefine((value, context) => { - if (!isAbsolute(value)) - context.addIssue({ - code: "invalid_format", - format: "regex", - message: "must be an absolute local filesystem path", - input: value, - }); - }); +export const absoluteLocalPathStringSchema = rejectUnpairedSurrogates( + z + .string() + // Reported as the format issue the NUL-free pattern raised before, so + // the refusal's reason does not depend on how the rule is advertised. + .superRefine((value, context) => { + if (value.includes("\0")) + context.addIssue({ + code: "invalid_format", + format: "regex", + message: NUL_PATH_MESSAGE, + input: value, + continue: false, + }); + }) + .min(1) + .regex(absoluteNulFreePathPattern, { + message: "must be an absolute local filesystem path", + abort: true, + }), + UNPAIRED_SURROGATE_PATH_MESSAGE, +).superRefine((value, context) => { + if (!isAbsolute(value)) + context.addIssue({ + code: "invalid_format", + format: "regex", + message: "must be an absolute local filesystem path", + input: value, + }); +}); /** Test lexical containment on the host platform; callers must resolve symlinks first. */ export const isPathWithinRoot = (root: string, path: string): boolean => { diff --git a/src/server/DeferredEvidenceMcpServer.ts b/src/server/DeferredEvidenceMcpServer.ts index 186feddc63..04d64813c7 100644 --- a/src/server/DeferredEvidenceMcpServer.ts +++ b/src/server/DeferredEvidenceMcpServer.ts @@ -268,16 +268,19 @@ export class DeferredEvidenceMcpServer extends EvidenceMcpServerCore { } /** - * Recorded tools already list their presented description; keep it rather - * than project every canonical input schema when the runtime materializes. + * Recorded tools already list their presented description, or its absence; + * keep it rather than project every canonical input schema when the + * runtime materializes, so discovery and the loaded listing agree. */ protected override describeTool( name: string, advertised: () => string | undefined, ): { description?: string } { - const recorded = this.tools.get(name)?.registered.description; - if (this.materializing && recorded !== undefined) - return { description: recorded }; + const binding = this.tools.get(name); + if (this.materializing && binding !== undefined) { + const recorded = binding.registered.description; + return recorded === undefined ? {} : { description: recorded }; + } return super.describeTool(name, advertised); } diff --git a/tests/acceptance/applications/graphqlContract.test.ts b/tests/acceptance/applications/graphqlContract.test.ts index b37538fd33..f201eaecc2 100644 --- a/tests/acceptance/applications/graphqlContract.test.ts +++ b/tests/acceptance/applications/graphqlContract.test.ts @@ -122,7 +122,13 @@ const checkRetainedPages = async (call: McpCall, parent: Evidence) => { expect(paged).toEqual(report.fields); }; -const checkAdvertisedSchema = async ( +/** + * The served schema accepts the input, and the handler refuses each invalid + * variant. The served schema does not state these rules yet (#15311): the + * format const and the view structure are known gaps in + * servedSchemaParity.test.ts. + */ +const checkServedInput = async ( client: Awaited>["client"], input: { path: string; format: string; operations_path: string }, ) => { @@ -130,7 +136,7 @@ const checkAdvertisedSchema = async ( client, "inspect_api_contract", ); - expect(schemas.ajv.validate(schemas.canonicalInputSchema, input)).toBe(true); + expect(schemas.ajv.validate(schemas.inputSchema, input)).toBe(true); for (const invalid of [ { ...input, format: "openapi-json" }, { ...input, view: { kind: "api-contract", collection: "operations" } }, @@ -143,9 +149,14 @@ const checkAdvertisedSchema = async ( }, }, ]) - expect(schemas.ajv.validate(schemas.canonicalInputSchema, invalid)).toBe( - false, - ); + expect( + parseMcpToolError( + await client.callTool({ + name: "inspect_api_contract", + arguments: invalid, + }), + ).error, + ).toMatchObject({ code: "invalid_request" }); }; /** One stdio MCP session for the file; each test passes its own schema path. */ @@ -232,7 +243,7 @@ cliTest( format: "graphql-sdl", operations_path: operationsPath, }; - await checkAdvertisedSchema(client, input); + await checkServedInput(client, input); const summaryResponse = await call("inspect_api_contract", input); expect(summaryResponse.isError).not.toBe(true); const summary = asView(summaryResponse.structuredContent); diff --git a/tests/acceptance/artifactExtractionSelection.test.ts b/tests/acceptance/artifactExtractionSelection.test.ts index fdbc0e6e6c..3ffc53dea0 100644 --- a/tests/acceptance/artifactExtractionSelection.test.ts +++ b/tests/acceptance/artifactExtractionSelection.test.ts @@ -125,23 +125,12 @@ it("publishes the same selected occurrences through CLI and MCP and rejects inva const schemas = await advertisedMcpToolSchemas(client, "extract_artifact"); for (const occurrence_ids of [[id], ids]) expect( - schemas.ajv.validate(schemas.canonicalInputSchema, { + schemas.ajv.validate(schemas.inputSchema, { output_root: output, occurrence_ids, }), JSON.stringify(schemas.ajv.errors), ).toBe(true); - expect( - schemas.ajv.validate(schemas.canonicalInputSchema, { - output_root: output, - occurrence_ids: [id, id], - }), - ).toBe(false); - expect(schemas.ajv.errors).toEqual( - expect.arrayContaining([ - expect.objectContaining({ keyword: "uniqueItems" }), - ]), - ); const reply = await artifactMcpCall(client, { name: "extract_artifact", arguments: { output_root: output, occurrence_ids: ids.toReversed() }, diff --git a/tests/boundary/mcp/absoluteLocalPathSchema.test.ts b/tests/boundary/mcp/absoluteLocalPathSchema.test.ts index 2550fe466c..0940b47a7f 100644 --- a/tests/boundary/mcp/absoluteLocalPathSchema.test.ts +++ b/tests/boundary/mcp/absoluteLocalPathSchema.test.ts @@ -1,6 +1,4 @@ -import { canonicalInputSchema } from "../../fixtures/canonicalOutputSchema.js"; import { Client, InMemoryTransport } from "@modelcontextprotocol/client"; -import { Ajv2020 } from "ajv/dist/2020.js"; import { resolve } from "node:path"; import { expect, it } from "vitest"; @@ -247,72 +245,6 @@ const inputCases = ( ]; }; -it("advertises portable absolute-path constraints after SDK schema conversion", async () => { - const firmwareCalls: string[] = []; - const { client, close } = await createMcp(firmwareCalls, "compact"); - try { - const listed = await client.listTools(); - const ajv = new Ajv2020({ strict: false, validateFormats: false }); - const absolute = resolve("rea-absolute-input"); - const relative = "relative-input"; - const schemaCases = [ - ...inputCases(absolute, relative), - { - name: "inspect_go_binary", - field: "path NUL", - valid: { path: absolute }, - invalid: { path: `${absolute}\0` }, - }, - { - name: "import_evidence_bundle", - field: "path NUL", - valid: { path: absolute }, - invalid: { path: `${absolute}\0` }, - }, - { - name: "compare_bundles", - field: "left_bundle_path empty", - valid: { left_bundle_path: absolute, right_bundle_path: absolute }, - invalid: { left_bundle_path: "", right_bundle_path: absolute }, - }, - { - name: "compare_bundles", - field: "left_bundle_path NUL", - valid: { left_bundle_path: absolute, right_bundle_path: absolute }, - invalid: { - left_bundle_path: `${absolute}\0`, - right_bundle_path: absolute, - }, - }, - ]; - const checked: string[] = []; - for (const { name, field, valid, invalid } of schemaCases) { - if (!listed.tools.some((tool) => tool.name === name)) - throw new Error(`Missing advertised tool ${name}`); - // The canonical projection keeps portable constraints; handlers enforce - // the executing host's stricter path rules. - const validate = ajv.compile(canonicalInputSchema(name)); - expect(validate(invalid), `${name}.${field}`).toBe(false); - expect( - validate(valid), - `${name}.${field}: ${JSON.stringify(validate.errors)}`, - ).toBe(true); - checked.push(`${name}.${field}`); - } - expect(checked).toEqual( - expect.arrayContaining([ - "open_binary.path", - "extract_firmware.output_directory", - "inspect_go_binary.path NUL", - "compare_bundles.left_bundle_path empty", - ]), - ); - expect(firmwareCalls).toEqual([]); - } finally { - await close(); - } -}); - const relativeInspectionPaths = [ ["inspect_dwarf_units", "program"], ["inspect_elf_dependencies", "program"], diff --git a/tests/boundary/mcp/absoluteLocalPathTools.test.ts b/tests/boundary/mcp/absoluteLocalPathTools.test.ts deleted file mode 100644 index a52aef04b8..0000000000 --- a/tests/boundary/mcp/absoluteLocalPathTools.test.ts +++ /dev/null @@ -1,183 +0,0 @@ -import { Client, InMemoryTransport } from "@modelcontextprotocol/client"; -import { Ajv2020 } from "ajv/dist/2020.js"; -import type { AnySchema } from "ajv"; -import { expect, it } from "vitest"; - -import { JAVASCRIPT_RECOVERY_TOOL_CONTRACTS } from "../../../src/contracts/javascript/javascriptRecoveryToolContracts.js"; -import { BINARY_DIAGNOSTICS_TOOL_CONTRACTS } from "../../../src/contracts/native/binaryDiagnosticsToolContracts.js"; -import { V8_CODE_CACHE_TOOL_CONTRACTS } from "../../../src/contracts/v8/v8CodeCacheToolContracts.js"; -import { MAVEN_GRADLE_METADATA_TOOL_CONTRACTS } from "../../../src/contracts/java/mavenGradleMetadataToolContracts.js"; -import { WEB_SCRIPT_TOOL_CONTRACTS } from "../../../src/contracts/webScriptToolContracts.js"; -import { API_CONTRACT_TOOL_CONTRACTS } from "../../../src/contracts/apiContractToolContracts.js"; -import { PLAYWRIGHT_TRACE_TOOL_CONTRACTS } from "../../../src/contracts/playwrightTraceToolContracts.js"; -import { PYTHON_PYC_TOOL_CONTRACTS } from "../../../src/contracts/python/pythonPycToolContracts.js"; -import { DEB_PACKAGE_TOOL_CONTRACTS } from "../../../src/contracts/deb/debPackageToolContracts.js"; -import { NUGET_NUPKG_TOOL_CONTRACTS } from "../../../src/contracts/nuget/nupkgToolContracts.js"; -import { VSIX_PACKAGE_TOOL_CONTRACTS } from "../../../src/contracts/vsix/vsixPackageToolContracts.js"; -import { OCI_IMAGE_LAYOUT_TOOL_CONTRACTS } from "../../../src/contracts/oci/ociImageLayoutToolContracts.js"; -import { YARA_TOOL_CONTRACTS } from "../../../src/contracts/yara/yaraToolContracts.js"; -import { RequestTrackingMcpServer } from "../../../src/server/RequestTrackingMcpServer.js"; -import { toolRegistrationOptions } from "../../../src/server/toolRegistrationOptions.js"; -import { createMcpSchemaValidation } from "../../fixtures/mcpSchemaValidation.js"; - -const CONTRACTS = [ - ...BINARY_DIAGNOSTICS_TOOL_CONTRACTS, - ...WEB_SCRIPT_TOOL_CONTRACTS, - ...JAVASCRIPT_RECOVERY_TOOL_CONTRACTS, - ...API_CONTRACT_TOOL_CONTRACTS, - ...PLAYWRIGHT_TRACE_TOOL_CONTRACTS, - ...PYTHON_PYC_TOOL_CONTRACTS, - ...DEB_PACKAGE_TOOL_CONTRACTS, - ...NUGET_NUPKG_TOOL_CONTRACTS, - ...VSIX_PACKAGE_TOOL_CONTRACTS, - ...OCI_IMAGE_LAYOUT_TOOL_CONTRACTS, - ...YARA_TOOL_CONTRACTS, - ...V8_CODE_CACHE_TOOL_CONTRACTS, - ...MAVEN_GRADLE_METADATA_TOOL_CONTRACTS, -]; - -const PATH_FIELDS = { - inspect_apple_ips: ["path"], - inspect_elf_notes: ["path"], - inspect_elf_debug_link: ["path", "candidate_path"], - inspect_elf_unwind_ranges: ["path"], - inspect_macho_function_starts: ["path"], - inspect_kernel_module: ["path"], - inspect_byte_entropy: ["path"], - inspect_api_contract: ["path", "operations_path"], - inspect_devicetree: ["path"], - inspect_playwright_trace: ["path"], - inspect_python_pyc: ["path"], - inspect_deb_package: ["path"], - inspect_nuget_nupkg: ["path"], - inspect_vsix_package: ["path"], - inspect_oci_image_layout: ["path"], - inspect_yara_matches: ["path", "rule_paths"], - inspect_v8_code_cache: ["path"], - inspect_maven_gradle_metadata: ["path"], - export_web_scripts: ["capture_path", "output_directory"], - recover_javascript_sources: ["path", "output_directory", "additional_paths"], -} as const; - -const absoluteFile = - process.platform === "win32" ? "C:\\sample.bin" : "/tmp/sample.bin"; -const absoluteDirectory = process.platform === "win32" ? "C:\\out" : "/tmp/out"; - -const contractFor = (name: keyof typeof PATH_FIELDS) => { - const contract = CONTRACTS.find((candidate) => candidate.name === name); - if (contract === undefined) throw new Error(`Missing contract ${name}`); - return contract; -}; - -const validInput = ( - name: keyof typeof PATH_FIELDS, -): Record => { - if (name === "inspect_api_contract") - return { - format: "graphql-sdl", - path: absoluteFile, - operations_path: absoluteFile, - }; - if (name === "export_web_scripts") - return { - capture_path: absoluteFile, - output_directory: absoluteDirectory, - }; - if (name === "recover_javascript_sources") - return { - path: absoluteFile, - output_directory: absoluteDirectory, - additional_paths: [absoluteFile], - }; - if (name === "inspect_yara_matches") - return { path: absoluteFile, rule_paths: [absoluteFile] }; - return { path: absoluteFile }; -}; - -const withRelativeField = ( - name: keyof typeof PATH_FIELDS, - field: string, -): Record => ({ - ...validInput(name), - [field]: - field === "additional_paths" || field === "rule_paths" - ? ["sample.bin"] - : "sample.bin", -}); - -it("rejects one relative path field at a time on tools/list", async () => { - const server = new RequestTrackingMcpServer({ - name: "absolute-path-schema", - version: "1", - }); - for (const name of Object.keys(PATH_FIELDS) as (keyof typeof PATH_FIELDS)[]) { - const contract = contractFor(name); - server.registerTool( - contract.name, - toolRegistrationOptions(contract), - () => ({ content: [] }), - ); - } - const client = new Client( - { name: "absolute-path-client", version: "1" }, - { jsonSchemaValidator: createMcpSchemaValidation() }, - ); - const [clientTransport, serverTransport] = - InMemoryTransport.createLinkedPair(); - const ajv = new Ajv2020({ strict: false, validateFormats: false }); - const checked: string[] = []; - try { - await server.connect(serverTransport); - await client.connect(clientTransport); - const listed = await client.listTools(); - for (const name of Object.keys( - PATH_FIELDS, - ) as (keyof typeof PATH_FIELDS)[]) { - const schema = listed.tools.find( - (tool) => tool.name === name, - )?.inputSchema; - expect(schema, name).toBeDefined(); - if (schema === undefined) throw new Error(`Missing schema ${name}`); - const validate = ajv.compile(schema as AnySchema); - expect(validate(validInput(name)), `${name} valid`).toBe(true); - for (const field of PATH_FIELDS[name]) { - expect( - validate(withRelativeField(name, field)), - `${name}.${field}`, - ).toBe(false); - checked.push(`${name}.${field}`); - } - } - } finally { - await client.close(); - await server.close(); - } - expect(checked).toEqual([ - "inspect_apple_ips.path", - "inspect_elf_notes.path", - "inspect_elf_debug_link.path", - "inspect_elf_debug_link.candidate_path", - "inspect_elf_unwind_ranges.path", - "inspect_macho_function_starts.path", - "inspect_kernel_module.path", - "inspect_byte_entropy.path", - "inspect_api_contract.path", - "inspect_api_contract.operations_path", - "inspect_devicetree.path", - "inspect_playwright_trace.path", - "inspect_python_pyc.path", - "inspect_deb_package.path", - "inspect_nuget_nupkg.path", - "inspect_vsix_package.path", - "inspect_oci_image_layout.path", - "inspect_yara_matches.path", - "inspect_yara_matches.rule_paths", - "inspect_v8_code_cache.path", - "inspect_maven_gradle_metadata.path", - "export_web_scripts.capture_path", - "export_web_scripts.output_directory", - "recover_javascript_sources.path", - "recover_javascript_sources.output_directory", - "recover_javascript_sources.additional_paths", - ]); -}); diff --git a/tests/boundary/mcp/advertisedDialect.test.ts b/tests/boundary/mcp/advertisedDialect.test.ts index 7cd1946cd2..69f99443a2 100644 --- a/tests/boundary/mcp/advertisedDialect.test.ts +++ b/tests/boundary/mcp/advertisedDialect.test.ts @@ -1,5 +1,4 @@ -import { Client, InMemoryTransport } from "@modelcontextprotocol/client"; -import { describe, expect, it, onTestFinished } from "vitest"; +import { describe, expect, it } from "vitest"; import { advertisedInputDialectViolations, @@ -10,10 +9,7 @@ import { } from "../../../src/contracts/advertisedDialect.js"; import { mcpOutputSchemaProfileSchema } from "../../../src/config/mcpOutputSchemaProfile.js"; import { mcpToolCatalogProfileSchema } from "../../../src/config/mcpToolCatalogProfile.js"; -import { createServer } from "../../../src/server/createServer.js"; -import { silentLogger } from "../../../src/logger.js"; -import { createTestBinarySession } from "../../fixtures/binarySession.js"; -import { createMcpSchemaValidation } from "../../fixtures/mcpSchemaValidation.js"; +import { listServedTools } from "../../fixtures/servedToolCatalog.js"; describe("portable regex grammar", () => { // Each refused construct failed to compile in at least one of V8 (plain, @@ -133,30 +129,6 @@ it("reports patternProperties keys as advertised patterns", () => { ]); }); -const listTools = async (environment: Readonly) => { - const session = createTestBinarySession(() => { - throw new Error("No deep provider may start for a schema projection"); - }); - const server = createServer( - { kind: "session", session }, - { environment, logger: silentLogger }, - ); - const client = new Client( - { name: "advertised-dialect", version: "1" }, - { jsonSchemaValidator: createMcpSchemaValidation() }, - ); - onTestFinished(async () => { - await client.close(); - await server.close(); - await session.close(); - }); - const [clientTransport, serverTransport] = - InMemoryTransport.createLinkedPair(); - await server.connect(serverTransport); - await client.connect(clientTransport); - return (await client.listTools()).tools; -}; - const distinct = ( into: Map, definition: AdvertisedToolDefinition, @@ -168,7 +140,7 @@ it("advertises every profile within the portable dialect", async () => { const uncompilable: string[] = []; for (const output of mcpOutputSchemaProfileSchema.options) for (const catalog of mcpToolCatalogProfileSchema.options) { - const tools = await listTools({ + const tools = await listServedTools({ ...process.env, REA_MCP_OUTPUT_SCHEMA_PROFILE: output, REA_MCP_TOOL_CATALOG_PROFILE: catalog, diff --git a/tests/boundary/mcp/agentFirstContact.test.ts b/tests/boundary/mcp/agentFirstContact.test.ts new file mode 100644 index 0000000000..aa38be2c1f --- /dev/null +++ b/tests/boundary/mcp/agentFirstContact.test.ts @@ -0,0 +1,479 @@ +import { Client, InMemoryTransport } from "@modelcontextprotocol/client"; +import type { CallToolResult } from "@modelcontextprotocol/server"; +import { fc } from "@fast-check/vitest"; +import { Ajv2020 } from "ajv/dist/2020.js"; +import { afterAll, beforeAll, expect, it } from "vitest"; + +import type { ToolContract } from "../../../src/contracts/toolContractTypes.js"; +import { TOOL_CONTRACTS } from "../../../src/contracts/toolContracts.js"; +import { silentLogger } from "../../../src/logger.js"; +import { createServer } from "../../../src/server/createServer.js"; +import { createTestBinarySession } from "../../fixtures/binarySession.js"; +import { createMcpSchemaValidation } from "../../fixtures/mcpSchemaValidation.js"; +import { parseMcpToolError } from "../../fixtures/mcpToolError.js"; +import { + defaultMcpEnvironment, + servedToolCatalog, + type ServedTool, +} from "../../fixtures/servedToolCatalog.js"; + +// What an agent's first, mistaken calls receive. Each served tool is called +// with generated wrong arguments on a session with nothing open, and every +// refusal must keep three promises: +// I1 every tool the refusal names as a next step is advertised, and a tool +// that needs an open target names open_binary, whatever the argument +// error; +// I2 arguments the served schema accepts never get schema remediation; +// I3 retryable:true means an identical replay may succeed, so a refusal +// that a deterministic replay repeats unchanged must not claim it. + +type JsonRecord = Record; + +const isRecord = (value: unknown): value is JsonRecord => + typeof value === "object" && value !== null && !Array.isArray(value); + +type MistakeKind = + | "unknown_path_key" + | "omitted_required" + | "nothing_open" + | "missing_file" + | "unknown_id" + | "stale_revision"; + +interface WrongCall { + readonly tool: string; + readonly kind: MistakeKind; + readonly args: JsonRecord; +} + +/** + * The promise a finding breaks, one code per check so a known failure of one + * check never admits another check's failure for the same call: I1 is + * `unadvertised_next_tool` and `omits_open_binary`, I2 `schema_remediation` + * and I3 `replay_repeats`. + */ +type Check = + | "unadvertised_next_tool" + | "omits_open_binary" + | "schema_remediation" + | "replay_repeats"; + +interface Finding { + readonly check: Check; + readonly tool: string; + readonly kind: MistakeKind; + readonly detail: string; +} + +const findingKey = ({ check, tool, kind }: Finding): string => + `${check} ${tool} ${kind}`; + +const contracts: ReadonlyMap = new Map( + TOOL_CONTRACTS.map((contract) => [contract.name, contract]), +); + +const requiresTarget = (tool: string): boolean => + contracts.get(tool)?.availability === "active-target"; + +/** Effects that could reach past REA's own state when a call is admitted. */ +const reachesOutside = (tool: string): boolean => { + const effects = contracts.get(tool)?.effects; + if (effects === undefined) return true; + return ( + effects.launchesProcess || + effects.accessesNetwork || + effects.writesFilesystem || + effects.executesForeignCode || + effects.mutatesDevice || + effects.mutatesTarget || + effects.changesUiState || + effects.mayDiscardData + ); +}; + +const servedProperties = (tool: ServedTool): JsonRecord => + isRecord(tool.inputSchema.properties) ? tool.inputSchema.properties : {}; + +const servedRequired = (tool: ServedTool): readonly string[] => + Array.isArray(tool.inputSchema.required) + ? tool.inputSchema.required.filter( + (name): name is string => typeof name === "string", + ) + : []; + +const isPathField = (field: string, value: unknown): value is string => + typeof value === "string" && + value.startsWith("/") && + /(?:^|_)path$/u.test(field); + +interface Values { + readonly missingFile: string; + readonly unknownKey: string; +} + +/** Keys an agent guesses for its target file. */ +const GUESSED_KEYS = ["path", "file", "binary_path", "target"] as const; + +const DEFAULT_VALUES: Values = { + missingFile: "/rea-first-contact/missing/target.bin", + unknownKey: "path", +}; + +/** + * The wrong calls an agent makes first, from each tool's first example. + * Calls that schema validation or the open-target check refuses are made + * for every tool. Calls that the served schema admits run only for tools + * whose declared effects stay inside REA, so the sweep never launches, + * writes, changes a device or reaches the network. + */ +const wrongCallsFor = (tool: ServedTool, values: Values): WrongCall[] => { + const contract = contracts.get(tool.name); + const example = contract?.examples[0]?.input; + if (contract === undefined || example === undefined) return []; + const base: JsonRecord = { ...example }; + const properties = servedProperties(tool); + const required = servedRequired(tool); + const calls: WrongCall[] = []; + const add = (kind: MistakeKind, args: JsonRecord) => + calls.push({ tool: tool.name, kind, args }); + // The guessed key, or the next guess when the tool serves that name. + const unknownKey = [values.unknownKey, ...GUESSED_KEYS].find( + (key) => !(key in properties), + ); + if (unknownKey !== undefined) + add("unknown_path_key", { ...base, [unknownKey]: values.missingFile }); + for (const field of required) { + const { [field]: _omitted, ...rest } = base; + add("omitted_required", rest); + } + if (requiresTarget(tool.name)) { + // An optional path names its own target; without it the open one is used. + const pathless = Object.fromEntries( + Object.entries(base).filter( + ([field, value]) => + !isPathField(field, value) || required.includes(field), + ), + ); + if (!Object.entries(pathless).some(([f, v]) => isPathField(f, v))) + add("nothing_open", pathless); + } + if (reachesOutside(tool.name)) return calls; + for (const [field, value] of Object.entries(base)) { + if (isPathField(field, value)) + add("missing_file", { ...base, [field]: values.missingFile }); + if (typeof value === "string" && field.endsWith("_id")) + add("unknown_id", base); + } + return calls; +}; + +type Refusal = ReturnType["error"]; + +const SCHEMA_REMEDIATION = + /advertised input schema|Read the declared input schema/iu; + +/** + * Tool names a refusal offers as next steps. The structured + * `recovery.operation` is the producer's next-tool fact and is kept whatever + * it names, so a misspelled or removed tool fails I1. Prose is free text in + * which field names, codes and tool names share one spelling, so only a + * contract's tool name is read from it as a next step. + */ +const namedTools = (refusal: Refusal): readonly string[] => { + const named = new Set(); + for (const [token] of refusal.remediation.action.matchAll( + /\b[a-z][a-z0-9]*(?:_[a-z0-9]+)+\b/gu, + )) + if (contracts.has(token)) named.add(token); + if (refusal.recovery !== undefined) named.add(refusal.recovery.operation); + return [...named]; +}; + +let names: ReadonlySet; +let served: readonly ServedTool[]; +let validators: ReadonlyMap boolean>; +let client: Client; +let release: () => Promise; + +beforeAll(async () => { + served = await servedToolCatalog(); + names = new Set(served.map((tool) => tool.name)); + const ajv = new Ajv2020({ + strict: false, + validateFormats: false, + inlineRefs: false, + code: { optimize: false }, + }); + validators = new Map( + served.map((tool) => { + const compiled = ajv.compile(tool.inputSchema); + return [tool.name, (input: unknown) => compiled(input)] as const; + }), + ); + const session = createTestBinarySession(() => { + throw new Error("A wrong first call must not start a binary provider"); + }); + const server = createServer( + { kind: "session", session }, + // The settings the served catalog was listed with. + { environment: defaultMcpEnvironment(), logger: silentLogger }, + ); + client = new Client( + { name: "agent-first-contact", version: "1" }, + { jsonSchemaValidator: createMcpSchemaValidation() }, + ); + const [clientTransport, serverTransport] = + InMemoryTransport.createLinkedPair(); + await server.connect(serverTransport); + await client.connect(clientTransport); + release = async () => { + await Promise.allSettled([client.close(), server.close()]); + await session.close(); + }; +}); + +afterAll(async () => { + await release(); +}); + +const call = async (tool: string, args: JsonRecord): Promise => + (await client.callTool({ name: tool, arguments: args })) as CallToolResult; + +/** + * Check one call's refusal and, for I3, its identical replay. Returns + * undefined when the call succeeded, so a sweep can count what it checked. + */ +const judge = async ( + wrong: WrongCall, +): Promise< + { readonly error: Refusal; readonly findings: readonly Finding[] } | undefined +> => { + const result = await call(wrong.tool, wrong.args); + if (result.isError !== true) return undefined; + const { error } = parseMcpToolError(result); + const findings: Finding[] = []; + const found = (check: Check, detail: string) => + findings.push({ check, tool: wrong.tool, kind: wrong.kind, detail }); + const next = namedTools(error); + for (const tool of next) + if (!names.has(tool)) + found("unadvertised_next_tool", `names unadvertised ${tool}`); + if ( + requiresTarget(wrong.tool) && + wrong.kind !== "missing_file" && + !next.includes("open_binary") + ) + found( + "omits_open_binary", + `${error.code} with nothing open omits open_binary`, + ); + if ( + validators.get(wrong.tool)?.(wrong.args) === true && + (error.recovery?.kind === "inspect_input_contract" || + SCHEMA_REMEDIATION.test(error.message) || + SCHEMA_REMEDIATION.test(error.remediation.action)) + ) + found( + "schema_remediation", + `schema-valid ${error.code} gets schema remediation`, + ); + if (error.retryable) { + const replay = await call(wrong.tool, wrong.args); + if ( + replay.isError === true && + parseMcpToolError(replay).error.code === error.code + ) + found( + "replay_repeats", + `retryable ${error.code} repeats on an identical replay`, + ); + } + return { error, findings }; +}; + +/** + * Refusals known to break a promise, grouped by root cause and keyed + * `check tool kind`. Fixing a cause removes its entries: an entry that no + * longer matches a finding fails the sweep, and a new finding fails it too. + */ +interface KnownFailure { + readonly reason: string; + readonly findings: readonly string[]; +} + +/** `check tool kind` entries for each tool listed. */ +const entries = ( + check: Check, + kind: MistakeKind, + tools: readonly string[], +): readonly string[] => tools.map((tool) => `${check} ${tool} ${kind}`); + +const KNOWN_FAILURES: Readonly> = { + schemaRemediationOnConformingInput: { + reason: + "#15312 (open: #15331): a missing file that the served schema accepts is presented as a schema mismatch with inspect_input_contract.", + findings: [ + ...entries("schema_remediation", "missing_file", [ + "inspect_api_contract", + "inspect_apk_signature", + "inspect_apple_ips", + "inspect_binary_hardening", + "inspect_byte_entropy", + "inspect_deb_package", + "inspect_devicetree", + "inspect_dwarf_units", + "inspect_electron_fuses", + "inspect_elf_debug_link", + "inspect_elf_dependencies", + "inspect_elf_notes", + "inspect_elf_unwind_ranges", + "inspect_erlang_beam", + "inspect_esp_nvs", + "inspect_evtx_archive", + "inspect_firmware_vector_table", + "inspect_go_binary", + "inspect_il2cpp_metadata", + "inspect_kernel_build_config", + "inspect_kernel_module", + "inspect_labview_artifact", + "inspect_macho_function_starts", + "inspect_maven_gradle_metadata", + "inspect_native_exports", + "inspect_native_initializers", + "inspect_ntfs_journal", + "inspect_nuget_nupkg", + "inspect_oci_image_layout", + "inspect_pe_certificates", + "inspect_pe_imports", + "inspect_pe_load_config", + "inspect_pe_overlay", + "inspect_pe_resources", + "inspect_pe_unwind_ranges", + "inspect_playwright_trace", + "inspect_python_pyc", + "inspect_rust_binary", + "inspect_uefi_nvram", + "inspect_v8_code_cache", + "inspect_vsix_package", + "inspect_windows_shortcut", + ]), + ], + }, + retryableByCodeTable: { + reason: + "#15323: revision_conflict is retryable by code, but an unchanged update with a stale expected_revision fails the same way every time.", + findings: ["replay_repeats update_unknown stale_revision"], + }, +}; + +const knownEntries = Object.values(KNOWN_FAILURES).flatMap( + ({ findings }) => findings, +); +const isKnown = (finding: Finding): boolean => + knownEntries.includes(findingKey(finding)); + +const SWEPT_KINDS = [ + "unknown_path_key", + "omitted_required", + "nothing_open", + "missing_file", + "unknown_id", +] as const satisfies readonly MistakeKind[]; + +it("keeps recovery promises on every generated wrong first call", async () => { + const findings: Finding[] = []; + const checked = new Map(); + for (const wrong of served.flatMap((tool) => + wrongCallsFor(tool, DEFAULT_VALUES), + )) { + const judged = await judge(wrong); + if (judged === undefined) continue; + checked.set(wrong.kind, (checked.get(wrong.kind) ?? 0) + 1); + findings.push(...judged.findings); + } + // Each generated mistake reached refusals; an empty sweep proves nothing. + for (const kind of SWEPT_KINDS) + expect(checked.get(kind), kind).toBeGreaterThan(0); + const keys = [...new Set(findings.map(findingKey))].sort(); + expect( + findings.filter((finding) => !isKnown(finding)), + "refusals that break a recovery promise", + ).toEqual([]); + expect( + knownEntries.filter( + (entry) => + SWEPT_KINDS.some((kind) => entry.endsWith(` ${kind}`)) && + !keys.includes(entry), + ), + "these known failures are fixed; remove them", + ).toEqual([]); +}); + +it("keeps recovery promises for generated mistaken values", async () => { + const tools = new Map( + served + .filter((tool) => wrongCallsFor(tool, DEFAULT_VALUES).length > 0) + .map((tool) => [tool.name, tool]), + ); + const segment = fc.stringMatching(/^[a-z][a-z0-9_.-]{0,11}$/u); + const values = fc.record({ + missingFile: fc + .array(segment, { minLength: 1, maxLength: 4 }) + .map((parts) => `/rea-first-contact-missing/${parts.join("/")}`), + unknownKey: fc.constantFrom(...GUESSED_KEYS), + }); + await fc.assert( + fc.asyncProperty( + fc.constantFrom(...tools.keys()), + values, + fc.nat(), + async (name, generated, pick) => { + const tool = tools.get(name); + if (tool === undefined) throw new Error(`${name} is not served`); + const calls = wrongCallsFor(tool, generated); + const wrong = calls[pick % calls.length]; + if (wrong === undefined) return true; + // A generated key or path is another spelling of the same mistake, + // so the sweep's known failures cover it. + return ((await judge(wrong))?.findings ?? []).every(isKnown); + }, + ), + { seed: 15_309, numRuns: 150, interruptAfterTimeLimit: 20_000 }, + ); +}); + +it("reports a structured next step that names no served tool", () => { + const refusal = { + remediation: { action: "Call open_binary, then retry with path." }, + recovery: { operation: "open_binray" }, + } as unknown as Refusal; + const next = namedTools(refusal); + expect(next).toEqual(["open_binary", "open_binray"]); + expect(next.filter((tool) => !names.has(tool))).toEqual(["open_binray"]); +}); + +it("marks a stale revision retryable only when a replay can succeed", async () => { + const recordExample = contracts.get("record_unknown")?.examples[0]?.input; + const updateExample = contracts.get("update_unknown")?.examples[0]?.input; + if (recordExample === undefined || updateExample === undefined) + throw new Error("Unknown tools have no examples"); + const recorded = await call("record_unknown", { ...recordExample }); + if (recorded.isError === true) + throw new Error(`record_unknown failed: ${JSON.stringify(recorded)}`); + const { unknown_id: unknownId } = ( + recorded.structuredContent as { readonly result: { unknown_id: string } } + ).result; + const judged = await judge({ + tool: "update_unknown", + kind: "stale_revision", + args: { ...updateExample, unknown_id: unknownId, expected_revision: 99 }, + }); + expect(judged?.error.code, JSON.stringify(judged?.error)).toBe( + "revision_conflict", + ); + expect(judged?.findings.filter((finding) => !isKnown(finding))).toEqual([]); + // The known failure still holds; remove its entry once it is fixed. + expect(judged?.findings.map(findingKey)).toEqual( + knownEntries.filter((entry) => entry.endsWith(" stale_revision")), + ); +}); diff --git a/tests/boundary/mcp/applicationExportShapeMcp.test.ts b/tests/boundary/mcp/applicationExportShapeMcp.test.ts index beaebf55a8..b4f7235de0 100644 --- a/tests/boundary/mcp/applicationExportShapeMcp.test.ts +++ b/tests/boundary/mcp/applicationExportShapeMcp.test.ts @@ -18,7 +18,7 @@ import { APPLICATION_TOOL_CONTRACTS } from "../../../src/contracts/applicationTo import { parseEvidence } from "../../../src/domain/evidence.js"; import { JAVASCRIPT_EXPORT_SHAPE_COMPARISON_EXAMPLE } from "../../../src/contracts/javascript/javascriptExportShapeComparisonExample.js"; -it("executes the advertised export presence example with matching analyzed Evidence", async () => { +it("executes the contract export presence example with matching analyzed Evidence", async () => { const contract = APPLICATION_TOOL_CONTRACTS.find( ({ name }) => name === "compare_javascript_export_shapes", ); @@ -28,17 +28,15 @@ it("executes the advertised export presence example with matching analyzed Evide "Report observed return-property presence when static values stay unknown", ); if (example === undefined) - throw new Error("Missing advertised presence example"); + throw new Error("Missing contract presence example"); const { client, close } = await createApplicationMcpHarness({ serverOptions: { environment: { ...process.env }, }, }); onTestFinished(close); - const listing = await client.listTools(); - const advertised = listing.tools.find( - ({ name }) => name === "compare_javascript_export_shapes", - ); + // The canonical contract's examples are distinct. The served schema does + // not carry them yet (#15311). const examples = z .array(z.unknown()) .parse(canonicalInputSchema("compare_javascript_export_shapes").examples); diff --git a/tests/boundary/mcp/artifactComparisonSourceSchema.test.ts b/tests/boundary/mcp/artifactComparisonSourceSchema.test.ts index 2ac43b9bc1..07d8c8d8bb 100644 --- a/tests/boundary/mcp/artifactComparisonSourceSchema.test.ts +++ b/tests/boundary/mcp/artifactComparisonSourceSchema.test.ts @@ -1,16 +1,13 @@ import { tmpdir } from "node:os"; import { join } from "node:path"; -import { Client, InMemoryTransport } from "@modelcontextprotocol/client"; -import { McpServer } from "@modelcontextprotocol/server"; import { Ajv2020 } from "ajv/dist/2020.js"; import { expect, it } from "vitest"; import { ARTIFACT_COMPARISON_EXAMPLE } from "../../../src/contracts/artifactComparisonExample.js"; import { toolContract } from "../../../src/contracts/toolContracts.js"; -import { toolRegistrationOptions } from "../../../src/server/toolRegistrationOptions.js"; -import { advertisedSchemaErrors } from "../../fixtures/mcpAdvertisedSchemaValidity.js"; -import { createMcpSchemaValidation } from "../../fixtures/mcpSchemaValidation.js"; +import { canonicalInputSchema } from "../../fixtures/canonicalOutputSchema.js"; +import { servedToolCatalog } from "../../fixtures/servedToolCatalog.js"; const evidence = ARTIFACT_COMPARISON_EXAMPLE.left; const retained = { @@ -22,97 +19,82 @@ const file = { path: join(tmpdir(), "evidence.json"), } as const; -it("advertises one spelling per compare_artifacts source and rejects the same sides the parser rejects", async () => { +it("accepts one spelling per compare_artifacts source and serves every accepted side", async () => { const contract = toolContract("compare_artifacts"); - const server = new McpServer({ name: "artifact-sources", version: "0" }); - const client = new Client( - { name: "artifact-sources", version: "0" }, - { jsonSchemaValidator: createMcpSchemaValidation() }, + const tool = (await servedToolCatalog()).find( + ({ name }) => name === contract.name, ); - const [clientTransport, serverTransport] = - InMemoryTransport.createLinkedPair(); - server.registerTool( - contract.name, - toolRegistrationOptions(contract), - async () => ({ content: [] }), - ); - try { - await server.connect(serverTransport); - await client.connect(clientTransport); - const { tools } = await client.listTools(); - expect(advertisedSchemaErrors(tools)).toEqual([]); - const tool = tools.find(({ name }) => name === contract.name); - if (tool === undefined) throw new Error("compare_artifacts not advertised"); - expect(tool.inputSchema.examples).toEqual([ - { - left: { - kind: "retained-evidence", - evidence_id: ARTIFACT_COMPARISON_EXAMPLE.left.evidence_id, - }, - right: { - kind: "retained-evidence", - evidence_id: ARTIFACT_COMPARISON_EXAMPLE.right.evidence_id, - }, + if (tool === undefined) throw new Error("compare_artifacts not advertised"); + // The canonical examples reference retained Evidence instead of + // embedding complete records. + expect(canonicalInputSchema(contract.name).examples).toEqual([ + { + left: { + kind: "retained-evidence", + evidence_id: ARTIFACT_COMPARISON_EXAMPLE.left.evidence_id, }, - ]); - const validate = new Ajv2020({ - strict: false, - validateFormats: false, - }).compile(tool.inputSchema); - const sides: readonly (readonly [string, unknown, boolean])[] = [ - ["complete Evidence", evidence, true], - ["retained reference", retained, true], - ["Evidence file", file, true], - [ - "selected bundle record", - { ...file, evidence_id: evidence.evidence_id }, - true, - ], - ["second inline spelling", { kind: "inline", evidence }, false], - ["retained reference without ID", { kind: "retained-evidence" }, false], - ["two references at once", { ...retained, path: file.path }, false], - [ - "Evidence carrying a source kind", - { ...evidence, kind: "retained-evidence" }, - false, - ], - ["relative Evidence file", { ...file, path: "evidence.json" }, false], - ["empty side", {}, false], - ]; - for (const [label, side, accepted] of sides) - for (const input of [ - { left: side, right: retained }, - { left: retained, right: side }, - ]) { - expect(contract.inputSchema.safeParse(input).success, label).toBe( - accepted, - ); - expect(validate(input), label).toBe(accepted); - } - expect(contract.inputSchema.safeParse({ left: retained }).success).toBe( + right: { + kind: "retained-evidence", + evidence_id: ARTIFACT_COMPARISON_EXAMPLE.right.evidence_id, + }, + }, + ]); + const validate = new Ajv2020({ + strict: false, + validateFormats: false, + }).compile(tool.inputSchema); + const sides: readonly (readonly [string, unknown, boolean])[] = [ + ["complete Evidence", evidence, true], + ["retained reference", retained, true], + ["Evidence file", file, true], + [ + "selected bundle record", + { ...file, evidence_id: evidence.evidence_id }, + true, + ], + ["second inline spelling", { kind: "inline", evidence }, false], + ["retained reference without ID", { kind: "retained-evidence" }, false], + ["two references at once", { ...retained, path: file.path }, false], + [ + "Evidence carrying a source kind", + { ...evidence, kind: "retained-evidence" }, false, - ); - expect(validate({ left: retained })).toBe(false); - // compare_functions is the precedent for the inline and retained forms; - // only the Evidence-file reference extends it. - const functions = toolContract("compare_functions"); - const shared = sides.filter( - ([, side]) => - typeof side !== "object" || - side === null || - !("kind" in side) || - side.kind !== "evidence-file", - ); - expect(shared).toHaveLength(sides.length - 3); - for (const [label, side] of shared) - expect( - functions.inputSchema.safeParse({ left: side, right: retained }) - .success, - label, - ).toBe( - contract.inputSchema.safeParse({ left: side, right: retained }).success, + ], + ["relative Evidence file", { ...file, path: "evidence.json" }, false], + ["empty side", {}, false], + ]; + for (const [label, side, accepted] of sides) + for (const input of [ + { left: side, right: retained }, + { left: retained, right: side }, + ]) { + expect(contract.inputSchema.safeParse(input).success, label).toBe( + accepted, ); - } finally { - await Promise.allSettled([client.close(), server.close()]); - } + // Every valid side passes the served schema; invalid sides are + // refused at runtime, and the catalog sweep tracks what is served. + if (accepted) expect(validate(input), label).toBe(true); + } + expect(contract.inputSchema.safeParse({ left: retained }).success).toBe( + false, + ); + expect(validate({ left: retained })).toBe(false); + // compare_functions is the precedent for the inline and retained forms; + // only the Evidence-file reference extends it. + const functions = toolContract("compare_functions"); + const shared = sides.filter( + ([, side]) => + typeof side !== "object" || + side === null || + !("kind" in side) || + side.kind !== "evidence-file", + ); + expect(shared).toHaveLength(sides.length - 3); + for (const [label, side] of shared) + expect( + functions.inputSchema.safeParse({ left: side, right: retained }).success, + label, + ).toBe( + contract.inputSchema.safeParse({ left: side, right: retained }).success, + ); }); diff --git a/tests/boundary/mcp/browserComparisonInput.test.ts b/tests/boundary/mcp/browserComparisonInput.test.ts index bb7c77316e..15a1ca7026 100644 --- a/tests/boundary/mcp/browserComparisonInput.test.ts +++ b/tests/boundary/mcp/browserComparisonInput.test.ts @@ -19,6 +19,7 @@ import { createToolResultDelivery } from "../../../src/server/toolResult.js"; import { toolRegistrationOptions } from "../../../src/server/toolRegistrationOptions.js"; import { startFakeCdpBrowser } from "../../fixtures/fakeCdpBrowser.js"; import { createMcpSchemaValidation } from "../../fixtures/mcpSchemaValidation.js"; +import { servedToolCatalog } from "../../fixtures/servedToolCatalog.js"; const delivery = createToolResultDelivery(STDIO_DEFAULT_MAX_BUFFER_SIZE); @@ -68,17 +69,19 @@ function invalidComparisonInputs( { before: passive.before, after: { ...passive.after, webmcp: {} } }, { before_scenario: {}, after_scenario: {} }, { ...scenario, before_scenario: { ...scenarioCapture, steps: [{}] } }, - ]; - const advertisedInvalid = [ + // Incomplete input groups: the served root cannot hold combinators, so + // its description names the groups and runtime enforces them. {}, { before: passive.before }, + { before_scenario: scenario.before_scenario }, + ]; + const advertisedInvalid = [ { before: { inspection: "{}" }, after: passive.after }, { before: passive.before, after: { ...passive.after, webmcp: "{}" }, }, { before_scenario: "{}", after_scenario: scenarioCapture }, - { before_scenario: scenario.before_scenario }, { ...passive, unexpected: true }, { ...scenario, @@ -121,7 +124,9 @@ describe("browser comparison input boundary", () => { try { await server.connect(serverTransport); await client.connect(clientTransport); - const advertised = (await client.listTools()).tools.find( + // The bare server runs the handler; the advertisement is what a + // session server serves. + const advertised = (await servedToolCatalog()).find( ({ name }) => name === contract.name, ); if (advertised === undefined) throw new Error("Missing comparison tool"); @@ -153,7 +158,7 @@ describe("browser comparison input boundary", () => { // Strict clients reject combinators and dependentRequired, so the // projection states the groups in its description and leaves group // completeness and exclusion to the canonical runtime parser. - expect(advertised.inputSchema.description).toContain( + expect(advertised.description).toContain( "before + after; before_scenario + after_scenario + [normalization]", ); const runtimeOnlyInvalid = [ diff --git a/tests/boundary/mcp/compactInputSchemaMcp.test.ts b/tests/boundary/mcp/compactInputSchemaMcp.test.ts index b4123c04e3..14cd55095c 100644 --- a/tests/boundary/mcp/compactInputSchemaMcp.test.ts +++ b/tests/boundary/mcp/compactInputSchemaMcp.test.ts @@ -10,12 +10,14 @@ import { import { advertisedInputJsonSchema } from "../../../src/contracts/toolSchemaMetadata.js"; import { advertiseTool } from "../../../src/contracts/advertisedTool.js"; import { createCatalogDigests } from "../../../src/contracts/catalog/catalogIdentity.js"; +import { analysisSettingIds } from "../../../src/domain/analysisSettingDefinitions.js"; import { processScenarioSchema } from "../../../src/domain/process/processScenario.js"; import { EvidenceMcpServer } from "../../../src/server/EvidenceMcpServer.js"; import { createToolResultDelivery } from "../../../src/server/toolResult.js"; import { toolRegistrationOptions } from "../../../src/server/toolRegistrationOptions.js"; import { createTestMcp } from "../../support/mcp/mcpFixture.js"; import { arrayItemSchemaError } from "../../fixtures/mcpClientSchemaConstraints.js"; +import { servedToolCatalog } from "../../fixtures/servedToolCatalog.js"; import { advertisedToolPresentation, COMPACT_INPUT_SCHEMA_BUDGET_BYTES, @@ -89,13 +91,15 @@ it("advertises compact inputs and guidance with matching default catalog identit const identity = createCatalogDigests(); expect(compact.catalogIdentity.digests).toEqual(identity); - // Examples are absent from the advertised catalog and its identity. - const withoutExamples = TOOL_CONTRACTS.map((contract) => - contract.examples.length === 0 ? contract : { ...contract, examples: [] }, - ); - expect(createCatalogDigests(withoutExamples).tools_sha256).toBe( - identity.tools_sha256, - ); + // Schemas carry no examples; a reduced or pruned schema states one in the + // description instead, so examples are part of the catalog identity. + for (const tool of compactTools) + expect(tool.inputSchema, tool.name).not.toHaveProperty("examples"); + expect( + compactTools.filter(({ description }) => + description?.includes("Example arguments: "), + ).length, + ).toBeGreaterThan(0); }); it("detects missing client-required items in nested array alternatives", () => { @@ -360,9 +364,20 @@ describe("MCP compact input schema canonical enforcement", () => { executable: "node", environment: { REA_PROCESS_RUN_ID: "caller-value" }, }; + const reservedWithTrailingNewline = { + executable: "node", + environment: { "REA_PROCESS_RUN_ID\n": "caller-value" }, + }; expect(validate(valid)).toBe(true); expect(processScenarioSchema.safeParse(valid).success).toBe(true); + // The portable dialect has no property-name rules, so the served + // description names the reserved key and the handler enforces it. + expect(advertised.description).toContain("REA_PROCESS_RUN_ID is reserved"); expect(processScenarioSchema.safeParse(reserved).success).toBe(false); + expect(validate(reservedWithTrailingNewline)).toBe(true); + expect( + processScenarioSchema.safeParse(reservedWithTrailingNewline).success, + ).toBe(true); const result = await client.callTool({ name: contract.name, arguments: reserved, @@ -547,3 +562,48 @@ it.each([ } }, ); + +it("serves every input schema within Codex's compaction threshold with setting IDs enumerated", async () => { + const served = await servedToolCatalog(); + // Codex compacts an MCP input schema above 5,000 serialized bytes and drops + // descriptions and nested structure first. + for (const tool of served) + expect( + Buffer.byteLength(JSON.stringify(tool.inputSchema)), + tool.name, + ).toBeLessThanOrEqual(5_000); + const settings = served.find( + ({ name }) => name === "update_analysis_settings", + ); + expect(settings?.inputSchema).toMatchObject({ + properties: { + changes: { + items: { + properties: { + setting: { enum: analysisSettingIds }, + action: { enum: ["set", "reset"] }, + }, + required: ["setting", "action"], + }, + }, + }, + }); + const validate = new Ajv2020({ strict: false }).compile( + settings!.inputSchema, + ); + const reset = { + changes: [{ setting: "asar.max_header_bytes", action: "reset" }], + }; + expect(validate(reset)).toBe(true); + expect( + validate({ changes: [{ setting: "unknown.setting", action: "reset" }] }), + ).toBe(false); + // The canonical parser keeps each setting's own bounds. + const contract = toolContract("update_analysis_settings"); + expect(contract.inputSchema.safeParse(reset).success).toBe(true); + expect( + contract.inputSchema.safeParse({ + changes: [{ setting: "asar.max_header_bytes", action: "set", value: 0 }], + }).success, + ).toBe(false); +}); diff --git a/tests/boundary/mcp/enhancedTools.callPathsAndBatches.test.ts b/tests/boundary/mcp/enhancedTools.callPathsAndBatches.test.ts index 1bb1286528..dfd53b7ffb 100644 --- a/tests/boundary/mcp/enhancedTools.callPathsAndBatches.test.ts +++ b/tests/boundary/mcp/enhancedTools.callPathsAndBatches.test.ts @@ -1,5 +1,4 @@ import { Ajv2020 } from "ajv/dist/2020.js"; -import { canonicalInputSchema } from "../../fixtures/canonicalOutputSchema.js"; import { afterEach, describe, expect, it } from "vitest"; import type { AnalysisOperationPort } from "../../../src/ports/AnalysisProvider.js"; @@ -465,7 +464,7 @@ describe("enhanced MCP batch cancellation", () => { ); }); -it("advertises and enforces the batch input budget before provider calls", async () => { +it("enforces the batch input budget before provider calls", async () => { let calls = 0; const client = await connect( { @@ -480,26 +479,24 @@ it("advertises and enforces the batch input budget before provider calls", async }, ); const { tools } = await client.listTools(); - expect(tools.some(({ name }) => name === "batch_decompile")).toBe(true); - // The compact wire presentation may widen the canonical array bound. - const canonical = canonicalInputSchema("batch_decompile"); - expect(canonical).toMatchObject({ - properties: { - addresses: { type: "array", maxItems: MAX_ENHANCED_RECORDS }, - }, - }); + const served = tools.find(({ name }) => name === "batch_decompile"); + if (served === undefined) throw new Error("batch_decompile is not served"); const addresses = Array.from({ length: MAX_ENHANCED_RECORDS }, () => "0x0"); const overLimit = { addresses: [...addresses, "0x1"] }; expect( enhancedInputSchemas.batch_decompile.safeParse({ addresses }).success, ).toBe(true); + expect( + enhancedInputSchemas.batch_decompile.safeParse(overLimit).success, + ).toBe(false); + // A batch at the limit passes the served schema; the handler refuses + // the oversized one whether or not the served schema states the bound. const validate = new Ajv2020({ strict: false, validateFormats: false, - }).compile(canonical); + }).compile(served.inputSchema); expect(validate({ addresses })).toBe(true); - expect(validate(overLimit)).toBe(false); const result = await client.callTool({ name: "batch_decompile", diff --git a/tests/boundary/mcp/evmInterfaceMcp.test.ts b/tests/boundary/mcp/evmInterfaceMcp.test.ts index 13d9bb75da..e37ce5dc18 100644 --- a/tests/boundary/mcp/evmInterfaceMcp.test.ts +++ b/tests/boundary/mcp/evmInterfaceMcp.test.ts @@ -76,8 +76,10 @@ mcpTest( name: "evm-detail", version: "1", }); - const { canonicalInputSchema: inputSchema } = - await advertisedMcpToolSchemas(client, "inspect_evm_interface"); + const { inputSchema } = await advertisedMcpToolSchemas( + client, + "inspect_evm_interface", + ); expect(inputSchema).toHaveProperty(["properties", "detail"], { type: "string", enum: ["complete", "summary"], diff --git a/tests/boundary/mcp/flutterMcp.test.ts b/tests/boundary/mcp/flutterMcp.test.ts index e7b12a45b3..a65a2b158a 100644 --- a/tests/boundary/mcp/flutterMcp.test.ts +++ b/tests/boundary/mcp/flutterMcp.test.ts @@ -213,7 +213,7 @@ const fakeProvider = (): RequestAnalysisPort => ({ }, }); -it("advertises and enforces the same Unicode selector grammar through MCP", async () => { +it("serves part of the Unicode selector grammar and enforces all of it through MCP", async () => { const harness = await createApplicationMcpHarness({ serverOptions: { flutterAnalysis: fakeProvider(), @@ -226,7 +226,7 @@ it("advertises and enforces the same Unicode selector grammar through MCP", asyn ); if (tool === undefined) throw new Error("Missing AOT tool"); const ajv = new Ajv2020({ strict: false, validateFormats: false }); - expect(ajv.validateSchema(canonicalInputSchema(tool.name))).toBe(true); + const served = ajv.compile(tool.inputSchema); for (const abi of [ "😀".repeat(65_521), "l".repeat(65_521), @@ -236,9 +236,7 @@ it("advertises and enforces the same Unicode selector grammar through MCP", asyn ), ]) { const arguments_ = { path: "/fixture.apk", abi }; - expect(ajv.validate(canonicalInputSchema(tool.name), arguments_)).toBe( - true, - ); + expect(served(arguments_)).toBe(true); expect( ( await harness.client.callTool({ @@ -248,19 +246,19 @@ it("advertises and enforces the same Unicode selector grammar through MCP", asyn ).isError, ).not.toBe(true); } - for (const [abi, reason] of [ - ["", "out_of_range"], - ["lib/x86_64", "invalid_format"], - ["😀".repeat(65_522), "invalid_value"], + // The served schema states the minimum length and the "/" rule. The + // handler refuses every value; the catalog sweep tracks what is served. + for (const [abi, reason, servedRejects] of [ + ["", "out_of_range", true], + ["lib/x86_64", "invalid_format", true], + ["😀".repeat(65_522), "invalid_value", false], ...["\n", "\r", "\u2028", "\u2029"].map( (terminator) => - ["l".repeat(65_521) + terminator, "invalid_value"] as const, + ["l".repeat(65_521) + terminator, "invalid_value", false] as const, ), ] as const) { const arguments_ = { path: "/fixture.apk", abi }; - expect(ajv.validate(canonicalInputSchema(tool.name), arguments_)).toBe( - false, - ); + if (servedRejects) expect(served(arguments_)).toBe(false); const refused = await harness.client.callTool({ name: "inspect_dart_aot", arguments: arguments_, diff --git a/tests/boundary/mcp/javascriptSourceSelection.test.ts b/tests/boundary/mcp/javascriptSourceSelection.test.ts index d5ee4a7e11..671cb10c24 100644 --- a/tests/boundary/mcp/javascriptSourceSelection.test.ts +++ b/tests/boundary/mcp/javascriptSourceSelection.test.ts @@ -1,7 +1,5 @@ -import { - canonicalInputSchema, - canonicalOutputSchema, -} from "../../fixtures/canonicalOutputSchema.js"; +import { canonicalOutputSchema } from "../../fixtures/canonicalOutputSchema.js"; +import { toolContract } from "../../../src/contracts/toolContracts.js"; import { Client } from "@modelcontextprotocol/client"; import { createPackageWithOptions } from "@electron/asar"; import { Ajv2020 } from "ajv/dist/2020.js"; @@ -145,12 +143,17 @@ it("advertises exact source selection and retains its scope through summary, Evi const validate = new Ajv2020({ strict: false, validateFormats: false, - }).compile(canonicalInputSchema("analyze_javascript_application")); + }).compile(schema); + const canonical = toolContract("analyze_javascript_application"); expect(validate({ input_path: root, source_paths: ["main.mjs"] })).toBe( true, ); + expect(validate({ input_path: root, source_paths: [1] })).toBe(false); for (const source_paths of [[], [""], [1]]) - expect(validate({ input_path: root, source_paths })).toBe(false); + expect( + canonical.inputSchema.safeParse({ input_path: root, source_paths }) + .success, + ).toBe(false); const selected = await client.callTool({ name: "analyze_javascript_application", arguments: { diff --git a/tests/boundary/mcp/nativeMachoSummaryMcp.test.ts b/tests/boundary/mcp/nativeMachoSummaryMcp.test.ts index 9cbe5425a8..cb6eb9f640 100644 --- a/tests/boundary/mcp/nativeMachoSummaryMcp.test.ts +++ b/tests/boundary/mcp/nativeMachoSummaryMcp.test.ts @@ -270,7 +270,7 @@ mcpTest( ); mcpTest( - "pages ambiguous imports and exact exports under the advertised MCP schema", + "pages ambiguous imports and exact exports through the served MCP schema", async ({ mcp, onTestFinished }) => { const empty = { items: [], total: 0, exhaustive: true, limitations: [] }; const imported = { @@ -351,10 +351,11 @@ mcpTest( source: { kind: "inline", evidence: source }, view: { kind: "macho", facet }, }; - expect( - schemas.ajv.validate(schemas.canonicalInputSchema, request), - JSON.stringify(schemas.ajv.errors), - ).toBe(true); + for (const schema of [schemas.inputSchema, schemas.canonicalInputSchema]) + expect( + schemas.ajv.validate(schema, request), + JSON.stringify(schemas.ajv.errors), + ).toBe(true); const reply = await client.callTool( { name: "inspect_analysis_view", arguments: request }, { toolDefinition: schemas.toolDefinition }, diff --git a/tests/boundary/mcp/servedSchemaParity.test.ts b/tests/boundary/mcp/servedSchemaParity.test.ts new file mode 100644 index 0000000000..5a8e57cb80 --- /dev/null +++ b/tests/boundary/mcp/servedSchemaParity.test.ts @@ -0,0 +1,830 @@ +import { Ajv2020 } from "ajv/dist/2020.js"; +import { fc } from "@fast-check/vitest"; +import { expect, it } from "vitest"; + +import { TOOL_CONTRACTS } from "../../../src/contracts/toolContracts.js"; +import { canonicalInputSchema } from "../../fixtures/canonicalOutputSchema.js"; +import { resolveReference } from "../../fixtures/mcpAdvertisedSchemaValidity.js"; +import { servedToolCatalog } from "../../fixtures/servedToolCatalog.js"; + +// Every constrained field of a canonical input contract must be visible to an +// agent in what `tools/list` serves: the served schema rejects a value the +// canonical parser rejects, or the served description names the rule. A +// violating value is derived from each contract example one field at a time, +// and the canonical parser decides whether it really violates the contract. + +type JsonRecord = Record; +type PathToken = string | number; + +interface Finding { + readonly tool: string; + /** The value path, with array positions written as []. */ + readonly path: string; + readonly keyword: string; +} + +const isRecord = (value: unknown): value is JsonRecord => + typeof value === "object" && value !== null && !Array.isArray(value); + +const CONSTRAINT_KEYWORDS = [ + "pattern", + "enum", + "const", + "minLength", + "maxLength", + "minimum", + "maximum", + "exclusiveMinimum", + "exclusiveMaximum", + "multipleOf", + "minItems", +] as const; +// `generated` marks a property-generated value, whose broken rule is unknown. +type ConstraintKeyword = + | (typeof CONSTRAINT_KEYWORDS)[number] + | (typeof ARRAY_KEYWORDS)[number] + | "required" + | "generated"; + +// Ordered so that a length-valid candidate comes first; the first candidate +// the pattern rejects is used. +const PATTERN_CANDIDATES = [ + "relative/x", + "x", + "X Y", + "0", + "-", + "zz:zz", + "\u0000", + "", +]; + +const numericBound = ( + schema: JsonRecord, + keyword: ConstraintKeyword, +): number | undefined => { + const bound = schema[keyword]; + return typeof bound === "number" && + (schema.type === "integer" || schema.type === "number") + ? bound + : undefined; +}; + +/** The smallest numeric step the schema's type admits. */ +const step = (schema: JsonRecord): number => + schema.type === "integer" ? 1 : 0.5; + +const patternViolation = (schema: JsonRecord): unknown => { + if (typeof schema.pattern !== "string") return undefined; + let pattern: RegExp; + try { + pattern = new RegExp(schema.pattern, "u"); + } catch { + return undefined; + } + const minLength = typeof schema.minLength === "number" ? schema.minLength : 0; + const maxLength = + typeof schema.maxLength === "number" + ? schema.maxLength + : Number.POSITIVE_INFINITY; + return PATTERN_CANDIDATES.find( + (candidate) => + candidate.length >= minLength && + candidate.length <= maxLength && + !pattern.test(candidate), + ); +}; + +const literalViolation = (allowed: unknown): unknown => { + if (!Array.isArray(allowed)) return undefined; + if (allowed.every((value) => typeof value === "string")) + return "__not_an_allowed_value__"; + if (allowed.every((value) => typeof value === "number")) + return Math.max(...allowed) + 1; + return undefined; +}; + +const multipleOfViolation = (schema: JsonRecord): unknown => { + const bound = numericBound(schema, "multipleOf"); + if (bound === undefined) return undefined; + const lowest = + typeof schema.minimum === "number" + ? schema.minimum + : typeof schema.exclusiveMinimum === "number" + ? schema.exclusiveMinimum + step(schema) + : 0; + const value = + Math.ceil(lowest / bound) * bound + + (schema.type === "integer" ? 1 : bound / 2); + const highest = + typeof schema.maximum === "number" + ? schema.maximum + : Number.MAX_SAFE_INTEGER; + return value <= highest && value % bound !== 0 ? value : undefined; +}; + +const lengthViolation = (bound: unknown, offset: number): unknown => + typeof bound === "number" && bound + offset >= 0 && bound < 100_000 + ? "a".repeat(bound + offset) + : undefined; + +const offsetBound = ( + schema: JsonRecord, + keyword: ConstraintKeyword, + offset: number, +): unknown => { + const bound = numericBound(schema, keyword); + return bound === undefined || !Number.isSafeInteger(Math.ceil(bound + offset)) + ? undefined + : bound + offset; +}; + +// Array rules whose violation repeats an example item. +const ARRAY_KEYWORDS = ["maxItems", "uniqueItems"] as const; + +/** One array violating each array rule, built from an example array. */ +const ARRAY_VIOLATIONS: Readonly< + Record< + (typeof ARRAY_KEYWORDS)[number], + (schema: JsonRecord, items: readonly unknown[]) => unknown + > +> = { + maxItems: (schema, [first]) => + typeof schema.maxItems === "number" && schema.maxItems < 100_000 + ? Array.from({ length: schema.maxItems + 1 }, () => first) + : undefined, + uniqueItems: (schema, [first]) => + schema.uniqueItems === true ? [first, first] : undefined, +}; + +/** One value violating each keyword of a schema, or undefined. */ +const VIOLATIONS: Readonly< + Record<(typeof CONSTRAINT_KEYWORDS)[number], (schema: JsonRecord) => unknown> +> = { + pattern: patternViolation, + enum: (schema) => literalViolation(schema.enum), + const: (schema) => literalViolation([schema.const]), + minLength: (schema) => + schema.minLength === 0 ? undefined : lengthViolation(schema.minLength, -1), + maxLength: (schema) => lengthViolation(schema.maxLength, 1), + minimum: (schema) => offsetBound(schema, "minimum", -step(schema)), + maximum: (schema) => offsetBound(schema, "maximum", step(schema)), + exclusiveMinimum: (schema) => offsetBound(schema, "exclusiveMinimum", 0), + exclusiveMaximum: (schema) => offsetBound(schema, "exclusiveMaximum", 0), + multipleOf: multipleOfViolation, + minItems: (schema) => (schema.minItems === 1 ? [] : undefined), +}; + +/** Tokens that a description naming this rule must contain. */ +const BOUND_PHRASES: Partial< + Record string> +> = { + minLength: (value) => `at least ${value} character`, + maxLength: (value) => `at most ${value} character`, + minItems: (value) => `at least ${value} entr`, + maxItems: (value) => `at most ${value} entr`, + minimum: (value) => `at least ${value}`, + maximum: (value) => `at most ${value}`, + exclusiveMinimum: (value) => `greater than ${value}`, + exclusiveMaximum: (value) => `less than ${value}`, + multipleOf: (value) => `multiple of ${value}`, +}; + +/** Whether the sentence states the token as a whole value, not a prefix of one. */ +const statesToken = (sentence: string, token: string): boolean => + new RegExp( + `${token.replaceAll(/[.*+?^${}()|[\]\\]/gu, "\\$&")}(?![0-9.]*[0-9])`, + "u", + ).test(sentence); + +const ruleTokens = ( + schema: JsonRecord, + keyword: ConstraintKeyword, +): readonly string[] | undefined => { + const bound = schema[keyword]; + if (keyword === "required") return []; + if (keyword === "enum" && Array.isArray(bound)) return bound.map(String); + if (keyword === "const") return [String(bound)]; + if (typeof bound === "number") { + // The rule's direction and unit with the complete value, as dialect + // guidance states it, so one bound never covers another. + const phrase = BOUND_PHRASES[keyword]; + return phrase === undefined ? undefined : [phrase(String(bound))]; + } + if (keyword === "uniqueItems" && bound === true) return ["distinct"]; + // A pattern is always expressible in the served schema; guidance alone + // cannot name it precisely. + return undefined; +}; + +interface Mutation { + readonly path: readonly PathToken[]; + readonly keyword: ConstraintKeyword; + readonly schema: JsonRecord; + /** Replace the value at `path`, or delete it when `delete` is set. */ + readonly value?: unknown; + readonly delete?: true; +} + +/** Where a value sits in an example input, and whether it is present. */ +interface ValueSite { + readonly value: unknown; + readonly present: boolean; + readonly path: readonly PathToken[]; +} + +/** One mutation per constraint reachable from an example in a schema. */ +class MutationCollector { + readonly mutations: Mutation[] = []; + + constructor(private readonly root: JsonRecord) {} + + visit( + schema: unknown, + site: ValueSite, + seen: ReadonlySet = new Set(), + ): void { + if (!isRecord(schema)) return; + const { $ref } = schema; + if (typeof $ref === "string" && !seen.has($ref)) + this.visit( + resolveReference(this.root, $ref), + site, + new Set([...seen, $ref]), + ); + for (const combinator of ["anyOf", "oneOf", "allOf"] as const) { + const members = schema[combinator]; + if (Array.isArray(members)) + for (const member of members) this.visit(member, site, seen); + } + for (const keyword of CONSTRAINT_KEYWORDS) { + if (!Object.hasOwn(schema, keyword)) continue; + const value = VIOLATIONS[keyword](schema); + if (value !== undefined) + this.mutations.push({ path: site.path, keyword, schema, value }); + } + if (site.present && Array.isArray(site.value) && site.value.length > 0) + for (const keyword of ARRAY_KEYWORDS) { + if (!Object.hasOwn(schema, keyword)) continue; + const value = ARRAY_VIOLATIONS[keyword](schema, site.value); + if (value !== undefined) + this.mutations.push({ path: site.path, keyword, schema, value }); + } + if (site.present) this.visitChildren(schema, site, seen); + } + + private visitChildren( + schema: JsonRecord, + { value, path }: ValueSite, + seen: ReadonlySet, + ): void { + if (isRecord(value) && isRecord(schema.properties)) { + const required = Array.isArray(schema.required) ? schema.required : []; + for (const [key, property] of Object.entries(schema.properties)) { + const present = Object.hasOwn(value, key); + if (present && required.includes(key)) + this.mutations.push({ + path: [...path, key], + keyword: "required", + schema, + delete: true, + }); + this.visit( + property, + { value: value[key], present, path: [...path, key] }, + seen, + ); + } + } + if (Array.isArray(value) && value.length > 0) + this.visit( + schema.items, + { value: value[0], present: true, path: [...path, 0] }, + seen, + ); + } +} + +const applyMutation = (input: unknown, mutation: Mutation): unknown => { + const copy: unknown = structuredClone(input); + let parent: unknown = copy; + for (const token of mutation.path.slice(0, -1)) + parent = (parent as Record)[token]; + const last = mutation.path.at(-1); + if (last === undefined) return copy; + if (mutation.delete === true) + delete (parent as Record)[last]; + else (parent as Record)[last] = mutation.value; + return copy; +}; + +const describePath = (path: readonly PathToken[]): string => + path.map((token) => (typeof token === "number" ? "[]" : token)).join("."); + +/** A field as the served guidance labels it, such as `paths[]` or `a.b`. */ +const guidanceLabel = (path: readonly PathToken[]): string => + path + .map((token) => (typeof token === "number" ? "[]" : `.${token}`)) + .join("") + .slice(1); + +/** + * The served description names a rule when one guidance sentence labels the + * field and states the rule's bound. A field is labelled by its full path, as + * dialect guidance writes it, or as a key of a shape the sentence states, such + * as the retained Evidence reference. Matching within one sentence keeps + * unrelated numbers elsewhere in the description, or a `Defaults:` value, + * from counting as the rule. An example states no rule, so it is excluded. + */ +const guidanceNamesRule = ( + description: string, + mutation: Mutation, +): boolean => { + const tokens = ruleTokens(mutation.schema, mutation.keyword); + const key = mutation.path.at(-1); + if (tokens === undefined || key === undefined) return false; + const field = `\`${guidanceLabel(mutation.path)}\``; + // Property names are identifiers, so they need no regular-expression escape. + const statesKey = (sentence: string, name: string): boolean => + new RegExp(`(? + (sentence.includes(field) && REQUIREMENT.test(sentence)) || + (Array.isArray(mutation.schema.required) && + mutation.schema.required.every( + (name) => typeof name === "string" && statesKey(sentence, name), + )) + : (sentence: string) => + sentence.includes(field) || + (typeof key === "string" && statesKey(sentence, key)); + return (description.split("Example arguments: ")[0] ?? "") + .split(/(?<=\.)\s+/u) + .some( + (sentence) => + labels(sentence) && + tokens.every((token) => statesToken(sentence, token)), + ); +}; + +/** Wording that makes a field mandatory rather than merely mentioning it. */ +const REQUIREMENT = + /\b(?:requires?|required|must (?:be )?(?:given|provided|supplied|include)|always (?:give|provide))\b/iu; + +/** One constrained field of one contract example, and its served tool. */ +interface ParitySite { + readonly tool: string; + readonly canonical: { safeParse(input: unknown): { success: boolean } }; + readonly description: string; + /** The keywords whose served rules reject the input; empty when accepted. */ + readonly validate: (input: unknown) => readonly string[]; + readonly example: unknown; + readonly mutation: Mutation; +} + +let cachedSites: Promise | undefined; + +/** Every constrained field reachable from every contract example. */ +const paritySites = (): Promise => + (cachedSites ??= (async () => { + const served = new Map( + (await servedToolCatalog()).map((tool) => [tool.name, tool]), + ); + const ajv = new Ajv2020({ + strict: false, + validateFormats: false, + allErrors: true, + inlineRefs: false, + code: { optimize: false }, + }); + const sites: ParitySite[] = []; + for (const contract of TOOL_CONTRACTS) { + const tool = served.get(contract.name); + if (tool === undefined) throw new Error(`${contract.name} is not served`); + const compiled = ajv.compile(tool.inputSchema); + const validate = (input: unknown): readonly string[] => + compiled(input) + ? [] + : (compiled.errors ?? []).map(({ keyword }) => keyword); + const canonical = canonicalInputSchema(contract.name); + for (const example of contract.examples) { + const collector = new MutationCollector(canonical); + collector.visit(canonical, { + value: example.input, + present: true, + path: [], + }); + for (const mutation of collector.mutations) + if (mutation.path.length > 0) + sites.push({ + tool: contract.name, + canonical: contract.inputSchema, + description: tool.description ?? "", + validate, + example: example.input, + mutation, + }); + } + } + return sites; + })()); + +/** + * Served keywords that state each canonical rule. A rejection covers the rule + * only when one of them fails, so a probe that another rule happens to reject + * (a too-long value that also breaks a pattern) cannot hide a missing rule. + * Integer exclusive bounds are served as inclusive ones. + */ +const SERVED_KEYWORDS: Readonly< + Partial> +> = { + enum: ["enum", "const"], + const: ["enum", "const"], + exclusiveMinimum: ["exclusiveMinimum", "minimum"], + exclusiveMaximum: ["exclusiveMaximum", "maximum"], +}; + +/** Whether the served schema rejects the input by the mutated rule. */ +const servedRejects = ( + failed: readonly string[], + keyword: ConstraintKeyword, +): boolean => + keyword === "generated" + ? failed.length > 0 + : failed.some((served) => + (SERVED_KEYWORDS[keyword] ?? [keyword]).includes(served), + ); + +/** + * Judge the site's derived violation, or a generated value at its field: + * false when the canonical parser accepts the input, true when the served + * schema rejects it or the description names the rule, otherwise the finding. + * Guidance never covers a generated value, whose broken rule is unknown. + */ +const judge = ( + site: ParitySite, + generated?: { readonly value: unknown }, +): Finding | boolean => { + const mutation: Mutation = + generated === undefined + ? site.mutation + : { + path: site.mutation.path, + schema: site.mutation.schema, + keyword: "generated", + value: generated.value, + }; + const input = applyMutation(site.example, mutation); + if (site.canonical.safeParse(input).success) return false; + if ( + servedRejects(site.validate(input), mutation.keyword) || + guidanceNamesRule(site.description, mutation) + ) + return true; + return { + tool: site.tool, + path: describePath(mutation.path), + keyword: mutation.keyword, + }; +}; + +/** The exhaustive deterministic sweep: one violating value per site. */ +const servedParityFindings = async (): Promise<{ + readonly findings: readonly Finding[]; + readonly checked: number; +}> => { + const findings = new Map(); + let checked = 0; + for (const site of await paritySites()) { + const verdict = judge(site); + if (verdict === false) continue; + checked += 1; + if (verdict !== true) findings.set(findingKey(verdict), verdict); + } + return { findings: [...findings.values()], checked }; +}; + +const findingKey = ({ tool, path, keyword }: Finding): string => + `${tool} ${path} ${keyword}`; + +/** + * Served constraints known to be missing, grouped by root cause. An entry is + * `tool path keyword` for one field, or `tool path.*` for every finding below + * a path whose served structure is omitted. Fixing a cause removes its + * entries; an entry that no longer matches a finding fails this test. + */ +interface KnownGap { + readonly reason: string; + readonly findings: readonly string[]; +} + +const matchesKnownGap = (entry: string, finding: Finding): boolean => { + if (!entry.endsWith(".*")) return entry === findingKey(finding); + const prefix = entry.slice(0, -2); + const at = `${finding.tool} ${finding.path}`; + return at === prefix || at.startsWith(`${prefix}.`); +}; + +const KNOWN_GAPS: Readonly> = { + evidenceRecordAlternative: { + reason: + "An Evidence field also accepts a complete record, advertised as an open object, so a malformed reference matches that alternative.", + findings: [ + "compare_web_captures after_scenario.evidence_id pattern", + "compare_web_captures before_scenario.evidence_id pattern", + ], + }, + reducedRootProperty: { + reason: + "#15311: a reduced schema keeps the rules of scalar root properties, but not array rules or a literal that differs between root union branches.", + findings: [ + "analyze_javascript_application detail const", + "analyze_javascript_application source_paths minItems", + "analyze_javascript_application source_paths.[] minLength", + "analyze_web_bundle detail const", + "capture_browser_scenario actions minItems", + "export_build_environment tasks maxItems", + "export_build_environment tasks minItems", + "extract_artifact occurrence_ids minItems", + "inspect_api_contract format const", + ], + }, + reducedInput: { + reason: + "#15311, #13302: a reduced schema omits everything below its root properties.", + findings: [ + "build_reconstruction_obligation_ledger evidence_bundle.*", + "build_reconstruction_obligation_ledger manifest.*", + "capture_browser_scenario actions.[].*", + "capture_browser_scenario browser.*", + "capture_browser_scenario start_url.*", + "compare_artifacts left.*", + "compare_artifacts right.*", + "compare_source_to_bundle reference.*", + "evaluate_reconstruction_coverage coverage.*", + "export_build_environment tasks.[].*", + "inspect_analysis_view source.*", + "inspect_analysis_view view.*", + "inspect_api_contract view.*", + "trace_application_feature seed.*", + "trace_javascript_semantics query.*", + ], + }, + depthPruned: { + reason: + "#15311: depth pruning replaces nested structure with a type placeholder.", + findings: [ + "check_build_task task.checks.[].*", + "correlate_static_and_runtime mappings.[].static.selector.*", + "start_build_computer source.install.*", + "verify_reconstruction specification.claims.[].*", + ], + }, +}; + +const knownGapEntries = Object.values(KNOWN_GAPS).flatMap( + ({ findings }) => findings, +); + +it("serves every canonical input constraint as a schema rule or guidance", async () => { + const { findings, checked } = await servedParityFindings(); + // Every constrained field of every contract example was exercised. + expect(checked).toBeGreaterThan(10_000); + expect( + findings + .filter( + (finding) => + !knownGapEntries.some((entry) => matchesKnownGap(entry, finding)), + ) + .map(findingKey), + "served schemas accept these canonical violations without guidance", + ).toEqual([]); + expect( + knownGapEntries.filter( + (entry) => !findings.some((finding) => matchesKnownGap(entry, finding)), + ), + "these known gaps are fixed; remove them", + ).toEqual([]); +}); + +// Absolute-path fields at the root, nested in objects and inside arrays. The +// sweep must derive a violating value for each one from a contract example. +const ABSOLUTE_PATH_FIELDS = [ + "analyze_javascript_application input_path", + "binary_session expected_server_path", + "capture_browser_scenario browser.executable_path", + "capture_electron_scenario application_path", + "capture_electron_scenario application_root", + "capture_electron_scenario executable_path", + "close_binary snapshot_path", + "compare_bundles left_bundle_path", + "compare_bundles right_bundle_path", + "decompile_all output_directory", + "export_evidence_bundle path", + "export_web_scripts capture_path", + "export_web_scripts output_directory", + "extract_artifact output_root", + "extract_firmware output_directory", + "extract_firmware path", + "import_evidence_bundle path", + "inspect_analysis_view source.path", + "inspect_api_contract operations_path", + "inspect_api_contract path", + "inspect_apple_ips path", + "inspect_byte_entropy path", + "inspect_deb_package path", + "inspect_devicetree path", + "inspect_elf_debug_link candidate_path", + "inspect_elf_debug_link path", + "inspect_elf_notes path", + "inspect_elf_unwind_ranges path", + "inspect_firmware_regions path", + "inspect_go_binary path", + "inspect_kernel_module path", + "inspect_macho_function_starts path", + "inspect_managed_artifact path", + "inspect_maven_gradle_metadata path", + "inspect_nuget_nupkg path", + "inspect_oci_image_layout path", + "inspect_playwright_trace path", + "inspect_python_pyc path", + "inspect_v8_code_cache path", + "inspect_vsix_package path", + "inspect_yara_matches path", + "inspect_yara_matches rule_paths.[]", + "open_binary path", + "open_binary snapshot_path", + "recover_javascript_sources additional_paths.[]", + "recover_javascript_sources output_directory", + "recover_javascript_sources path", +] as const; + +it("derives violations for root, nested and array path fields", async () => { + const visited = new Set( + (await paritySites()) + .filter(({ mutation }) => mutation.keyword === "pattern") + .map(({ tool, mutation }) => `${tool} ${describePath(mutation.path)}`), + ); + expect(ABSOLUTE_PATH_FIELDS.filter((field) => !visited.has(field))).toEqual( + [], + ); +}); + +/** + * Fields whose canonical rule lives in a `.refine()` or transform, so the + * served schema has no keyword for it and no guidance names it. The generated + * property found each; the value is one input runtime rejects and the served + * schema accepts. Endpoint fields are #15319; the UEFI paths check + * absoluteness in a refinement instead of the shared pattern; Frida `program` + * and objdump fields depend on a cross-field rule. + */ +const REFINEMENT_GAPS: Readonly> = { + // Reduced form; detail literals differ between root union branches (#15311). + "analyze_javascript_application detail": "a", + "capture_web_screenshot cdp_endpoint": "a", + "extract_uefi_firmware output_directory": "a", + "extract_uefi_firmware path": "a", + "guided_workflows workflow_id": "a", + "inspect_electron_page cdp_endpoint": "a", + "inspect_native_data_type address": "jpc^!", + "inspect_uefi_firmware path": "a", + "inspect_uefi_nvram path": "a", + "inspect_web_event_listeners cdp_endpoint": "a", + "inspect_web_page cdp_endpoint": "a", + "inspect_with_objdump path": "a", + "inspect_with_objdump symbol": ".", + "instrument_with_frida program": "a", + "list_browser_targets cdp_endpoint": "a", + "list_electron_targets cdp_endpoint": "a", + "list_javascript_runtime_targets inspector_endpoint": "a", + "observe_javascript_runtime inspector_endpoint": "a", + "observe_web_execution cdp_endpoint": "a", + "observe_web_session cdp_endpoint": "a", + "record_unknown domain": " ", + "start_frida_session program": "a", +}; + +it("keeps the refinement gaps current", async () => { + const sites = await paritySites(); + // A gap remains while some example still lets the value through. + const fixed = Object.entries(REFINEMENT_GAPS).filter( + ([field, value]) => + !sites.some( + (site) => + `${site.tool} ${describePath(site.mutation.path)}` === field && + typeof judge(site, { value }) !== "boolean", + ), + ); + expect(fixed, "these refinement gaps are fixed; remove them").toEqual([]); +}); + +// Relative paths, separators, NUL, whitespace and arbitrary short text. +const stringViolation = fc.oneof( + fc.stringMatching(/^[a-z][a-z0-9_-]{0,12}(?:\/[a-z0-9_.-]{1,8}){0,2}$/u), + fc.constantFrom("", ".", "..", "a", "\u0000", " ", "C:", "\\\\"), + fc.string({ maxLength: 24 }), +); + +it("serves string constraints for generated values", async () => { + const sites = (await paritySites()).filter( + ({ mutation }) => + mutation.keyword !== "required" && + (mutation.schema.type === "string" || mutation.keyword === "pattern"), + ); + // The property checks the rule a generated value breaks, not the keyword + // that selected its site, so a known gap covers the whole field. + const known = (finding: Finding): boolean => + Object.hasOwn(REFINEMENT_GAPS, `${finding.tool} ${finding.path}`) || + knownGapEntries.some( + (entry) => + matchesKnownGap(entry, finding) || + entry.startsWith(`${finding.tool} ${finding.path} `), + ); + fc.assert( + fc.property(fc.constantFrom(...sites), stringViolation, (site, value) => { + const verdict = judge(site, { value }); + return typeof verdict === "boolean" || known(verdict); + }), + { seed: 15_328, numRuns: 200 }, + ); +}); + +it("counts guidance only when one sentence labels the field and its rule", () => { + const entries: Mutation = { + path: ["filesystem_observation_paths", 0], + keyword: "minLength", + schema: { type: "string", minLength: 1 }, + value: "", + }; + const distinct: Mutation = { + path: ["type_names"], + keyword: "uniqueItems", + schema: { type: "array", uniqueItems: true }, + value: ["a", "a"], + }; + // Controls: the field and an unrelated bound in separate sentences, the + // parent field's own bound, a default and an example name no entry rule. + for (const description of [ + "Lists filesystem_observation_paths. Stops after 1 terminal event.", + "`filesystem_observation_paths` must contain at least 1 item.", + 'Defaults: filesystem_observation_paths=["1"].', + 'Example arguments: {"filesystem_observation_paths":["1"]}', + ]) + expect(guidanceNamesRule(description, entries), description).toBe(false); + expect( + guidanceNamesRule( + "Observes files. `filesystem_observation_paths[]` must be at least 1 character.", + entries, + ), + ).toBe(true); + // Another bound on the same field, or a longer value, is not this rule. + const minimumLength: Mutation = { + path: ["decoders"], + keyword: "minLength", + schema: { type: "string", minLength: 1, maxLength: 8192 }, + value: "", + }; + for (const description of [ + "`decoders` must have at most 8192 characters.", + "`decoders` must have at least 10 characters.", + ]) + expect(guidanceNamesRule(description, minimumLength), description).toBe( + false, + ); + expect( + guidanceNamesRule( + "`decoders` must have at least 1 characters.", + minimumLength, + ), + ).toBe(true); + // A too-long locale that also breaks the pattern is covered only while the + // served maximum itself rejects it. + expect(servedRejects(["pattern"], "maxLength")).toBe(false); + expect(servedRejects(["maxLength", "pattern"], "maxLength")).toBe(true); + expect(servedRejects(["minimum"], "exclusiveMinimum")).toBe(true); + // A requirement must be stated, not only mentioned, and a shape covers it + // only when it lists every required key of the field's parent. + const pid: Mutation = { + path: ["pid"], + keyword: "required", + schema: { type: "object", required: ["mode", "pid"] }, + delete: true, + }; + for (const description of [ + "`pid` is optional.", + 'Pass {"target":{"pid":1}} to select a child.', + ]) + expect(guidanceNamesRule(description, pid), description).toBe(false); + for (const description of [ + "`pid` is required when attaching.", + 'Give {"mode":"attach","pid":1}.', + ]) + expect(guidanceNamesRule(description, pid), description).toBe(true); + expect( + guidanceNamesRule("`type_names` entries must be distinct.", distinct), + ).toBe(true); + expect(guidanceNamesRule("`type_names` lists names.", distinct)).toBe(false); +}); diff --git a/tests/boundary/mcp/toolSchemaValidity.test.ts b/tests/boundary/mcp/toolSchemaValidity.test.ts index b8d0c008a9..e5fd07a2b3 100644 --- a/tests/boundary/mcp/toolSchemaValidity.test.ts +++ b/tests/boundary/mcp/toolSchemaValidity.test.ts @@ -8,7 +8,6 @@ import { advertisedInputExamples } from "../../../src/contracts/advertisedInputE import { TOOL_CONTRACTS } from "../../../src/contracts/toolContracts.js"; import { advertiseTool } from "../../../src/contracts/advertisedTool.js"; import { emptyArraySchema } from "../../../src/domain/emptyArraySchema.js"; -import { processScenarioSchema } from "../../../src/domain/process/processScenario.js"; import { arrayItemSchemaError, unsupportedInputLiteralSchemaError, @@ -19,7 +18,6 @@ import { recursiveReferences, resolveReference, } from "../../fixtures/mcpAdvertisedSchemaValidity.js"; -import { toolRegistrationOptions } from "../../../src/server/toolRegistrationOptions.js"; import { servedCatalog } from "../../../src/application/environment/environmentState.js"; import { environmentToolAnswer } from "../../../src/application/environment/environmentToolAnswer.js"; import { createEnvironmentMcpServer } from "../../../src/server/environment/serveEnvironment.js"; @@ -33,6 +31,11 @@ import { } from "../../fixtures/environmentStateWrites.js"; import { advertisedToolPresentation } from "../../../src/contracts/mcpSchemaPresentation.js"; import { createMcpSchemaValidation } from "../../fixtures/mcpSchemaValidation.js"; +import { servedToolCatalog } from "../../fixtures/servedToolCatalog.js"; +import { + canonicalInputSchema, + canonicalOutputSchema, +} from "../../fixtures/canonicalOutputSchema.js"; interface ToolSchemas { readonly name: string; @@ -95,24 +98,6 @@ async function listAdvertisedTools(server: McpServer) { } } -let cachedCanonicalTools: - | Promise>["tools"]> - | undefined; - -function listCanonicalAdvertisedTools() { - cachedCanonicalTools ??= (async () => { - const server = new McpServer({ name: "schema-validation", version: "0" }); - for (const contract of TOOL_CONTRACTS) - server.registerTool( - contract.name, - toolRegistrationOptions(contract), - async () => ({ content: [] }), - ); - return listAdvertisedTools(server); - })(); - return cachedCanonicalTools; -} - function expectKnownAuthorityHints(tools: readonly ToolSchemas[]): void { const advertised = new Map(tools.map((tool) => [tool.name, tool])); const expected = { @@ -375,79 +360,6 @@ it("finds references only in input schema positions, not literal data", () => { ).toEqual(["nested.inputSchema.properties.default.items.$ref"]); }); -const advertiseAndEnforceProcessEnvironmentKeyConstraint = - async (): Promise => { - const contract = TOOL_CONTRACTS.find( - ({ name }) => name === "capture_process_scenario", - ); - if (contract === undefined) - throw new Error("Process capture contract was not registered"); - - let handlerCalled = false; - const server = new McpServer({ name: "process-schema", version: "0" }); - server.registerTool( - contract.name, - { - title: contract.title, - description: contract.description, - inputSchema: processScenarioSchema.shape, - }, - async () => { - handlerCalled = true; - return { - content: [{ type: "text" as const, text: "handler ran" }], - isError: true, - }; - }, - ); - const client = new Client( - { name: "process-schema", version: "0" }, - { jsonSchemaValidator: createMcpSchemaValidation() }, - ); - const [clientTransport, serverTransport] = - InMemoryTransport.createLinkedPair(); - try { - await server.connect(serverTransport); - await client.connect(clientTransport); - const advertised = (await client.listTools()).tools.find( - ({ name }) => name === contract.name, - ); - if (advertised === undefined) - throw new Error("Process capture tool was not advertised"); - - const validate = new Ajv2020({ - strict: false, - validateFormats: false, - }).compile(advertised.inputSchema); - const valid = { executable: "node", environment: { APP_MODE: "test" } }; - const reserved = { - executable: "node", - environment: { REA_PROCESS_RUN_ID: "caller-value" }, - }; - const reservedWithTrailingNewline = { - executable: "node", - environment: { "REA_PROCESS_RUN_ID\n": "caller-value" }, - }; - expect(validate(valid)).toBe(true); - expect(contract.inputSchema.safeParse(valid).success).toBe(true); - expect(validate(reserved)).toBe(false); - expect(contract.inputSchema.safeParse(reserved).success).toBe(false); - expect(validate(reservedWithTrailingNewline)).toBe(true); - expect( - contract.inputSchema.safeParse(reservedWithTrailingNewline).success, - ).toBe(true); - - const result = await client.callTool({ - name: contract.name, - arguments: reserved, - }); - expect(result.isError).toBe(true); - expect(handlerCalled).toBe(false); - } finally { - await Promise.allSettled([client.close(), server.close()]); - } - }; - describe("served environment catalogs", () => { it("lists portable schemas for bulk bodies, pinned queries and fixed members", async () => { const edition = { format: "HC", featured: 1 }; @@ -536,15 +448,24 @@ describe("MCP JSON Schema validity", () => { }); it("advertises valid input and output schemas for every canonical tool", async () => { - const tools = await listCanonicalAdvertisedTools(); - expect(tools.map(({ name }) => name).sort()).toEqual( + const served = await servedToolCatalog(); + expect(served.map(({ name }) => name).sort()).toEqual( TOOL_CONTRACTS.map(({ name }) => name).sort(), ); + expect(advertisedSchemaErrors(served)).toEqual([]); + expectKnownAuthorityHints(served); + // The canonical contract schemas, which validating clients bind for + // output and the compact presentation projects for input. + const tools = TOOL_CONTRACTS.map(({ name }) => ({ + name, + inputSchema: canonicalInputSchema(name), + outputSchema: canonicalOutputSchema(name), + })); expect(advertisedSchemaErrors(tools)).toEqual([]); expect(localInputReferences(tools)).toEqual([]); expect(recursiveReferences(tools)).toEqual([]); - expectKnownAuthorityHints(tools); const byName = new Map(tools.map((tool) => [tool.name, tool])); + const servedByName = new Map(served.map((tool) => [tool.name, tool])); expectManagedLocalSignatureSchema(byName.get("inspect_managed_members")); const comparison = byName.get("compare_web_captures")?.inputSchema; for (const side of ["before", "after"]) @@ -564,8 +485,9 @@ describe("MCP JSON Schema validity", () => { ); for (const contract of TOOL_CONTRACTS) { const tool = byName.get(contract.name); - expect(tool?.title?.trim(), contract.name).toBeTruthy(); - expect(tool?.description?.trim(), contract.name).toBeTruthy(); + const listed = servedByName.get(contract.name); + expect(listed?.title?.trim(), contract.name).toBeTruthy(); + expect(listed?.description?.trim(), contract.name).toBeTruthy(); const examples = advertisedInputExamples(contract); expect(tool?.inputSchema.examples, contract.name).toEqual( examples.length === 0 ? undefined : examples, @@ -582,7 +504,7 @@ describe("MCP JSON Schema validity", () => { describe("MCP root input schemas", () => { it("advertises object roots while enforcing union requirements at runtime", async () => { - const tools = await listCanonicalAdvertisedTools(); + const tools = await servedToolCatalog(); const advertised = new Map(tools.map((tool) => [tool.name, tool])); const ajv = new Ajv2020({ strict: false, @@ -604,12 +526,11 @@ describe("MCP root input schemas", () => { expect(graphTool.inputSchema).toMatchObject({ type: "object" }); const validateGraph = ajv.compile(graphTool.inputSchema); compiledValidators.set("project_managed_application_graph", validateGraph); - expect(validateGraph({})).toBe(false); + // Clients reject root combinators, so the served schema accepts `{}` and + // the served description names the input groups instead. expect(validateGraph({ unrelated: true })).toBe(false); - expect(graphTool.inputSchema.description).toContain( - "Provide a complete input group", - ); - expect(graphTool.inputSchema.description).not.toContain("exactly one"); + expect(graphTool.description).toContain("Provide a complete input group"); + expect(graphTool.description).not.toContain("exactly one"); for (const contract of TOOL_CONTRACTS) { const inputSchema = advertised.get(contract.name)!.inputSchema; @@ -697,11 +618,6 @@ describe("MCP root input schemas", () => { }); }); -it( - "advertises and enforces the process-owned environment key constraint", - advertiseAndEnforceProcessEnvironmentKeyConstraint, -); - const advertiseAndEnforceItemSelectorCollectionConstraints = async (): Promise => { const contract = TOOL_CONTRACTS.find( @@ -710,7 +626,7 @@ const advertiseAndEnforceItemSelectorCollectionConstraints = if (contract === undefined) throw new Error("inspect_analysis_view contract was not registered"); - const advertised = (await listCanonicalAdvertisedTools()).find( + const advertised = (await servedToolCatalog()).find( ({ name }) => name === contract.name, ); if (advertised === undefined) @@ -731,9 +647,8 @@ const advertiseAndEnforceItemSelectorCollectionConstraints = view: { kind: "item", collection, selector }, }); const nodeId = `jag_node_${"b".repeat(64)}`; - // Collection-specific selector constraints must survive JSON Schema - // conversion: the advertised schema rejects exactly what runtime - // input validation rejects. + // Collection-specific selector constraints are enforced at runtime; the + // served schema must accept every valid selector. const invalid: ReadonlyArray = [ ["modules", { index: 0 }], ["modules", { name: "entry" }], @@ -752,7 +667,6 @@ const advertiseAndEnforceItemSelectorCollectionConstraints = const input = itemInput(collection, selector); const label = `${collection}/${Object.keys(selector as object)[0]}`; expect(contract.inputSchema.safeParse(input).success, label).toBe(false); - expect(validate(input), `advertised schema rejects ${label}`).toBe(false); } for (const [collection, selector] of valid) { const input = itemInput(collection, selector); @@ -769,7 +683,7 @@ it( describe("MCP process input JSON Schema", () => { it("advertises process strings without weakening terminal input", async () => { - const tools = await listCanonicalAdvertisedTools(); + const tools = await servedToolCatalog(); const processContract = TOOL_CONTRACTS.find( ({ name }) => name === "capture_process_scenario", ); @@ -787,12 +701,17 @@ describe("MCP process input JSON Schema", () => { { ...base, executable: "/usr/bin/true\0" }, { ...base, arguments: ["\0"] }, { ...base, working_directory: "/tmp\0" }, - { ...base, environment: { KEY: "value\0" } }, { ...base, filesystem_observation_paths: ["/tmp\0"] }, ]) { expect(processContract.inputSchema.safeParse(input).success).toBe(false); expect(validate(input)).toBe(false); } + // Runtime refuses a NUL environment value whether or not the served + // schema states the rule; the catalog sweep tracks what is served. + const nulEnvironmentValue = { ...base, environment: { KEY: "value\0" } }; + expect( + processContract.inputSchema.safeParse(nulEnvironmentValue).success, + ).toBe(false); const terminalInput = { ...base, events: [{ type: "input", at_ms: 0, data: "\0" }], diff --git a/tests/fixtures/servedToolCatalog.ts b/tests/fixtures/servedToolCatalog.ts new file mode 100644 index 0000000000..6cfcc5892f --- /dev/null +++ b/tests/fixtures/servedToolCatalog.ts @@ -0,0 +1,66 @@ +import { Client, InMemoryTransport } from "@modelcontextprotocol/client"; + +import { silentLogger } from "../../src/logger.js"; +import { createServer } from "../../src/server/createServer.js"; +import { createTestBinarySession } from "./binarySession.js"; +import { createMcpSchemaValidation } from "./mcpSchemaValidation.js"; + +export type ServedTool = Awaited< + ReturnType +>["tools"][number]; + +/** + * Every page of `tools/list` exactly as a session server serves it: the + * compact input presentation, dialect projection and generated guidance an + * MCP client receives. Schema parity tests read this listing rather than a + * contract registered on a bare SDK server, which skips the presentation. + */ +export const listServedTools = async ( + environment: Readonly = process.env, +): Promise => { + const session = createTestBinarySession(() => { + throw new Error("Listing tools must not start a binary provider"); + }); + const server = createServer( + { kind: "session", session }, + { environment, logger: silentLogger }, + ); + const client = new Client( + { name: "served-tool-catalog", version: "1" }, + { jsonSchemaValidator: createMcpSchemaValidation() }, + ); + const [clientTransport, serverTransport] = + InMemoryTransport.createLinkedPair(); + try { + await server.connect(serverTransport); + await client.connect(clientTransport); + const tools: ServedTool[] = []; + let cursor: string | undefined; + do { + const page = await client.listTools( + cursor === undefined ? undefined : { cursor }, + ); + tools.push(...page.tools); + cursor = page.nextCursor; + } while (cursor !== undefined); + return tools; + } finally { + await Promise.allSettled([client.close(), server.close()]); + await session.close(); + } +}; + +/** + * The process environment without host `REA_MCP_*` selections, so a served + * listing, and a server a test calls, do not depend on the developer's shell. + */ +export const defaultMcpEnvironment = (): NodeJS.ProcessEnv => + Object.fromEntries( + Object.entries(process.env).filter(([key]) => !key.startsWith("REA_MCP_")), + ); + +let cachedDefaultCatalog: Promise | undefined; + +/** The catalog served with default MCP settings, listed once per test module. */ +export const servedToolCatalog = (): Promise => + (cachedDefaultCatalog ??= listServedTools(defaultMcpEnvironment()));